]> git.eshelyaron.com Git - emacs.git/commitdiff
2005-09-13 Chong Yidong <cyd@stupidchicken.com>
authorChong Yidong <cyd@stupidchicken.com>
Mon, 12 Sep 2005 22:58:55 +0000 (22:58 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 12 Sep 2005 22:58:55 +0000 (22:58 +0000)
* 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.

lisp/ChangeLog
lisp/mail/sendmail.el
lisp/simple.el

index 2074b5d3f0295a642597b4403ca23d554c807b27..88e95167d9daff49c599da7c2eed43a2c1356d6f 100644 (file)
@@ -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>
 
index 32328a33177a2c99735ad2458ce571a458f55657..f7c62026d80bccdc7c5e576400d43e31d84c623a 100644 (file)
@@ -1657,6 +1657,9 @@ The seventh argument ACTIONS is a list of actions to take
 
   (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 @@ The seventh argument ACTIONS is a list of actions to take
   ;; (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? ")
index fe58a47610eed33c86cf8034e6fadb26adfe2b42..3d24a9222d45255bf8bf3e0ead9d0e04d6e470f0 100644 (file)
@@ -4444,9 +4444,8 @@ See also `read-mail-command' concerning reading mail."
   (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