changeset 65482:b7611654bd5e

2005-09-13 Chong Yidong <cyd@stupidchicken.com> * mail/sendmail.el (mail): Use new buffer if `noerase' is `new'. Fix behavior if noerase is `t' and there is no mail buffer. * simple.el (sendmail-user-agent-compose): Use a new mail buffer if `continue' is nil, rather than signal an error.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 12 Sep 2005 22:58:55 +0000
parents 59060d7bf36c
children 5431d3ba10fd
files lisp/ChangeLog lisp/mail/sendmail.el lisp/simple.el
diffstat 3 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Sep 12 22:54:28 2005 +0000
+++ b/lisp/ChangeLog	Mon Sep 12 22:58:55 2005 +0000
@@ -3,8 +3,11 @@
 	* custom.el (custom-push-theme): Handle the case where a symbol is
 	bound but face properties have not yet been assigned.
 
-	* mail/sendmail.el (mail): Use new buffer if `noerase' argument is
-	`new'.
+	* mail/sendmail.el (mail): Use new buffer if `noerase' is `new'.
+	Fix behavior if noerase is `t' and there is no mail buffer.
+	
+	* simple.el (sendmail-user-agent-compose): Use a new mail buffer
+	if `continue' is nil, rather than signal an error.
 
 2005-09-12  Richard M. Stallman  <rms@gnu.org>
 
--- a/lisp/mail/sendmail.el	Mon Sep 12 22:54:28 2005 +0000
+++ b/lisp/mail/sendmail.el	Mon Sep 12 22:58:55 2005 +0000
@@ -1657,6 +1657,9 @@
 
   (if (eq noerase 'new)
       (pop-to-buffer (generate-new-buffer "*mail*"))
+    (and noerase
+	 (not (get-buffer "*mail*"))
+	 (setq noerase nil))
     (pop-to-buffer "*mail*"))
 
   ;; Avoid danger that the auto-save file can't be written.
@@ -1673,8 +1676,8 @@
   ;; (in case the user has actually visited a file *mail*).
 ;  (set-visited-file-name nil)
   (let (initialized)
-    (and (or (not noerase)
-	     (eq noerase 'new))
+    (and (not (and noerase
+		   (not (eq noerase 'new))))
 	 (if buffer-file-name
 	     (if (buffer-modified-p)
 		 (when (y-or-n-p "Buffer has unsaved changes; reinitialize it and discard them? ")
--- a/lisp/simple.el	Mon Sep 12 22:54:28 2005 +0000
+++ b/lisp/simple.el	Mon Sep 12 22:58:55 2005 +0000
@@ -4444,9 +4444,8 @@
   (let ((cc (cdr (assoc-string "cc" other-headers t)))
 	(in-reply-to (cdr (assoc-string "in-reply-to" other-headers t)))
 	(body (cdr (assoc-string "body" other-headers t))))
-    (or (mail continue to subject in-reply-to cc yank-action send-actions)
-	continue
-	(error "Message aborted"))
+    (mail (if continue t 'new)
+	  to subject in-reply-to cc yank-action send-actions)
     (save-excursion
       (rfc822-goto-eoh)
       (while other-headers