emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master d9eff02: In sendmail-send-it don't switch to non-ex


From: Martin Rudalics
Subject: [Emacs-diffs] master d9eff02: In sendmail-send-it don't switch to non-existent buffer. (Bug#20211)
Date: Mon, 30 Mar 2015 15:39:53 +0000

branch: master
commit d9eff02736c975dc5035e02249ff17c8a068d203
Author: Richard Ryniker <address@hidden>
Commit: Martin Rudalics <address@hidden>

    In sendmail-send-it don't switch to non-existent buffer.  (Bug#20211)
    
    * mail/sendmail.el (sendmail-send-it): Do not attempt to switch
    to non-existent buffer (errbuf is not created when customization
    variable mail-interactive is nil).  (Bug#20211)
---
 lisp/ChangeLog        |    6 ++++++
 lisp/mail/sendmail.el |    8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fd346f0..69d9ab9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-30  Richard Ryniker  <address@hidden>  (tiny change)
+
+       * mail/sendmail.el (sendmail-send-it): Do not attempt to switch
+       to non-existent buffer (errbuf is not created when customization
+       variable mail-interactive is nil).  (Bug#20211)
+
 2015-03-29  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/smie.el (smie-backward-sexp-command)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 7e9bd5b..9fa7aa5 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1299,10 +1299,10 @@ external program defined by `sendmail-program'."
                   (error "Sending...failed to %s"
                          (buffer-substring (point-min) (point-max)))))))
       (kill-buffer tembuf)
-      (if (and (bufferp errbuf)
-               (not error))
-          (kill-buffer errbuf)
-        (switch-to-buffer-other-window errbuf)))))
+      (when (buffer-live-p errbuf)
+        (if error
+            (switch-to-buffer-other-window errbuf)
+          (kill-buffer errbuf))))))
 
 (autoload 'rmail-output-to-rmail-buffer "rmailout")
 



reply via email to

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