From: Chong Yidong Date: Mon, 12 Sep 2005 22:58:55 +0000 (+0000) Subject: 2005-09-13 Chong Yidong X-Git-Tag: emacs-pretest-22.0.90~7131 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09c9e6bbb9cf894b406b40e8198e1360528ada71;p=emacs.git 2005-09-13 Chong Yidong * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2074b5d3f02..88e95167d9d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 32328a33177..f7c62026d80 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -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? ") diff --git a/lisp/simple.el b/lisp/simple.el index fe58a47610e..3d24a9222d4 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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