1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-06 11:55:48 +00:00

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 5fbba6ccea)
This commit is contained in:
Richard Stallman 2016-09-02 21:55:09 -04:00 committed by Noam Postavsky
parent d31298d8af
commit 95eb641404

View File

@ -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