summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-09-19 10:20:33 +0000
committerMiles Bader <miles@gnu.org>2005-09-19 10:20:33 +0000
commit6f512f0b53ba23b88c686d27a748797add0a89dc (patch)
tree03b4e8c24f256dc8d90330ab1021d5ac238508d2 /lisp/mail
parentff8d296438e69b8cf701d95b6ccd271c416c46fd (diff)
parent430d3ed772627a9a23fccdeab2b868c6c41e8365 (diff)
downloademacs-6f512f0b53ba23b88c686d27a748797add0a89dc.tar.gz
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-82
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 542-553) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 116-121) - Merge from emacs--cvs-trunk--0 - Update from CVS
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/feedmail.el2
-rw-r--r--lisp/mail/rmail-spam-filter.el12
-rw-r--r--lisp/mail/sendmail.el21
3 files changed, 24 insertions, 11 deletions
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 7c7265ac8c9..d8740c036f2 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1943,7 +1943,7 @@ mapped to mostly alphanumerics for safety."
(file-exists-p a-s-file-name)
(delete-file a-s-file-name))))
(if feedmail-queue-chatty
- (progn (message (concat "FQM: Queued in " filename))
+ (progn (message "%s" (concat "FQM: Queued in " filename))
(sit-for feedmail-queue-chatty-sit-for)))
(if feedmail-queue-chatty
(progn
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index 7be5146f722..525bcd4096b 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -449,10 +449,10 @@ it from rmail file. Called for each new message retrieved by
(if rsf-autosave-newly-added-definitions
(progn
(custom-save-all)
- (message (concat "added subject \n <<< \n" message-subject
+ (message "%s" (concat "added subject \n <<< \n" message-subject
" \n >>> \n to list of spam definitions. \n"
"and saved the spam definitions to file.")))
- (message (concat "added subject \n <<< \n" message-subject
+ (message "%s" (concat "added subject \n <<< \n" message-subject
" \n >>> \n to list of spam definitions. \n"
"Don't forget to save the spam definitions to file using the spam
menu"))
@@ -478,10 +478,10 @@ it from rmail file. Called for each new message retrieved by
(if rsf-autosave-newly-added-definitions
(progn
(custom-save-all)
- (message (concat "added sender \n <<< \n" message-sender
+ (message "%s" (concat "added sender \n <<< \n" message-sender
" \n >>> \n to list of spam definitions. \n"
"and saved the spam definitions to file.")))
- (message (concat "added sender \n <<< \n " message-sender
+ (message "%s" (concat "added sender \n <<< \n " message-sender
" \n >>> \n to list of spam definitions."
"Don't forget to save the spam definitions to file using the spam
menu"))
@@ -521,10 +521,10 @@ Added to spam definitions as a contents field."
(if rsf-autosave-newly-added-definitions
(progn
(custom-save-all)
- (message (concat "added highlighted text \n <<< \n" region-to-spam-list
+ (message "%s" (concat "added highlighted text \n <<< \n" region-to-spam-list
" \n >>> \n to list of spam definitions. \n"
"and saved the spam definitions to file.")))
- (message (concat "added highlighted text \n <<< \n " region-to-spam-list
+ (message "%s" (concat "added highlighted text \n <<< \n " region-to-spam-list
" \n >>> \n to list of spam definitions."
"Don't forget to save the spam definitions to file using the
spam menu"))
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 4255788605f..d5566bb3464 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1591,8 +1591,13 @@ is inserted.
The normal hook `mail-setup-hook' is run after the message is
initialized. It can add more default fields to the message.
-When calling from a program, the first argument if non-nil says
-not to erase the existing contents of the `*mail*' buffer.
+The first argument, NOERASE, determines what to do when there is
+an existing modified `*mail*' buffer. If NOERASE is nil, the
+existing mail buffer is used, and the user is prompted whether to
+keep the old contents or to erase them. If NOERASE has the value
+`new', a new mail buffer will be created instead of using the old
+one. Any other non-nil value means to always select the old
+buffer without erasing the contents.
The second through fifth arguments,
TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil
@@ -1649,7 +1654,14 @@ The seventh argument ACTIONS is a list of actions to take
;;; (file-exists-p buffer-auto-save-file-name))
;;; (message "Auto save file for draft message exists; consider M-x mail-recover"))
;;; t))
- (pop-to-buffer "*mail*")
+
+ (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.
(let ((dir (expand-file-name
(file-name-as-directory mail-default-directory))))
@@ -1664,7 +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 (not noerase)
+ (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? ")