# HG changeset patch # User Chong Yidong # Date 1126565935 0 # Node ID b7611654bd5e3587231859aadfa0ccd3bb9c0a37 # Parent 59060d7bf36c4f579a09e1e48fc89f97b96cd1ff 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 -r 59060d7bf36c -r b7611654bd5e lisp/ChangeLog --- 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 diff -r 59060d7bf36c -r b7611654bd5e lisp/mail/sendmail.el --- 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? ") diff -r 59060d7bf36c -r b7611654bd5e lisp/simple.el --- 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