From 95eb641404adca84e71959a98369a30f1cadb7b6 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 2 Sep 2016 21:55:09 -0400 Subject: [PATCH 1/2] Fix mail-combine-fields * lisp/mail/sendmail.el (mail-combine-fields): Call `save-excursion' to avoid losing our place in the search loop. (cherry picked from commit 5fbba6cceaf843cfca449eb000a0a65243b61808) --- lisp/mail/sendmail.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 58f708a0c1e..3d222090ca6 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1110,10 +1110,11 @@ to combine them into one, and does so if the user says y." (save-restriction ;; This is just so the screen doesn't change. (narrow-to-region (point-min) old-max) - (goto-char old-point) - (setq query-asked t) - (if (y-or-n-p (format "Message contains multiple %s fields. Combine? " field)) - (setq query-answer t)))) + (save-excursion + (goto-char old-point) + (setq query-asked t) + (if (y-or-n-p (format "Message contains multiple %s fields. Combine? " field)) + (setq query-answer t))))) (when query-answer (let ((this-to-start (line-beginning-position)) this-to-end From c49198967ae90f97e315dde5a4d1b234200f13df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 1 Dec 2016 23:13:31 -0800 Subject: [PATCH 2/2] Port to Sun C 5.14 Backport from master. Sun C 5.14 supports C11 but not GCC extensions, and so refuses to compile Emacs without this patch. * src/alloc.c (lmalloc, lrealloc): Don't use INT_ADD_WRAPV on size_t, as in general this macro is restricted to signed types. --- src/alloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index d58532b97ff..6be0263a816 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1415,8 +1415,8 @@ lmalloc (size_t size) if (laligned (p, size)) break; free (p); - size_t bigger; - if (! INT_ADD_WRAPV (size, GCALIGNMENT, &bigger)) + size_t bigger = size + GCALIGNMENT; + if (size < bigger) size = bigger; } @@ -1432,8 +1432,8 @@ lrealloc (void *p, size_t size) p = realloc (p, size); if (laligned (p, size)) break; - size_t bigger; - if (! INT_ADD_WRAPV (size, GCALIGNMENT, &bigger)) + size_t bigger = size + GCALIGNMENT; + if (size < bigger) size = bigger; }