emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105388: (sendmail-query-once): Resto


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105388: (sendmail-query-once): Restore the current buffer after querying
Date: Tue, 02 Aug 2011 21:43:09 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105388
fixes bug(s): http://debbugs.gnu.org/9074
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2011-08-02 21:43:09 +0200
message:
  (sendmail-query-once): Restore the current buffer after querying
modified:
  lisp/ChangeLog
  lisp/mail/sendmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-08-02 19:05:04 +0000
+++ b/lisp/ChangeLog    2011-08-02 19:43:09 +0000
@@ -1,5 +1,8 @@
 2011-08-02  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * 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).
 

=== modified file 'lisp/mail/sendmail.el'
--- a/lisp/mail/sendmail.el     2011-07-11 20:15:04 +0000
+++ b/lisp/mail/sendmail.el     2011-08-02 19:43:09 +0000
@@ -165,7 +165,8 @@
 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 @@
                    (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))
 


reply via email to

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