2011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * 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).
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))
(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))