From: Lars Magne Ingebrigtsen Date: Tue, 2 Aug 2011 19:43:09 +0000 (+0200) Subject: (sendmail-query-once): Restore the current buffer after querying X-Git-Tag: emacs-pretest-24.0.90~104^2~124^2~66^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e07dd7c340290ff5b269bffcb9ff421fefb2e1f0;p=emacs.git (sendmail-query-once): Restore the current buffer after querying Fixes: debbugs:9074 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b75d042c5db..f6c1b8a5fdf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * mail/sendmail.el (sendmail-query-once): Restore the current + buffer after querying (bug#9074). + * dired.el (dired-flagged): Use different faces for marked and flagged files (bug#6117). diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index fe20ad921da..158435de86b 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -165,7 +165,8 @@ This is used by the default mail-sending commands. See also If `sendmail-query-once-function' is `query', ask the user what function to use, and then save that choice." (when (equal sendmail-query-once-function 'query) - (let* ((default + (let* ((mail-buffer (current-buffer)) + (default (cond ((or (and window-system (eq system-type 'darwin)) (eq system-type 'windows-nt)) @@ -195,7 +196,8 @@ function to use, and then save that choice." (if (y-or-n-p "Configure outgoing SMTP in Emacs? ") 'smtpmail-send-it default)) - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer)) + (set-buffer mail-buffer))))) (customize-save-variable 'sendmail-query-once-function function))) (funcall sendmail-query-once-function))