emacs-devel
[Top][All Lists]
Advanced

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

Re: sendmail.el


From: Noam Postavsky
Subject: Re: sendmail.el
Date: Wed, 24 Aug 2016 21:05:43 -0400

> This fixes a bug I ran across today.  My sources are from July,
> but the bug may be present in the Emacs 25.1 code.  Please check.
>
> 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 @@ mail-combine-fields
>                (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)))))

The wrapping of y-or-n-p with a save-excursion sounds similar to #2209
"copyright-update might not update copyright", I was thinking it might
be a case of a window point being different from the buffer point that
causes the unexpected move.



reply via email to

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