emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5fbba6c: Fix mail-combine-fields


From: Noam Postavsky
Subject: [Emacs-diffs] master 5fbba6c: Fix mail-combine-fields
Date: Sat, 3 Sep 2016 15:47:45 +0000 (UTC)

branch: master
commit 5fbba6cceaf843cfca449eb000a0a65243b61808
Author: Richard Stallman <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Fix mail-combine-fields
    
    * lisp/mail/sendmail.el (mail-combine-fields): Call `save-excursion' to
    avoid losing our place in the search loop.
---
 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 58f708a..3d22209 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]