From 694d374f41ac03b424a302a5c2962a7ba4001e14 Mon Sep 17 00:00:00 2001 From: ShengHuo ZHU Date: Sat, 17 Feb 2001 03:09:13 +0000 Subject: [PATCH] 2001-02-16 22:00:00 ShengHuo ZHU * message.el (message-do-send-housekeeping): Rename to a better name. --- lisp/ChangeLog | 5 +++++ lisp/message.el | 24 ++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a81e164a..4b4ec694a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-02-16 22:00:00 ShengHuo ZHU + + * message.el (message-do-send-housekeeping): Rename to a better + name. + 2001-02-16 18:00:00 ShengHuo ZHU * message.el (message-cancel-news): Check article first, then ask diff --git a/lisp/message.el b/lisp/message.el index aab43572d..2871e8560 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3716,9 +3716,25 @@ than 988 characters long, and if they are not, trim them until they are." ;; Rename the buffer. (if message-send-rename-function (funcall message-send-rename-function) - (when (string-match "\\`\\*\\(unsent \\)?" (buffer-name)) - (rename-buffer - (concat "*sent " (substring (buffer-name) (match-end 0))) t))) + (when (string-match "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*" + (buffer-name)) + (let ((name (match-string 2 (buffer-name))) + to group) + (if (not (or (string-equal name "mail") + (string-equal name "news"))) + (setq name (concat "*sent " name "*")) + (setq to (message-fetch-field "to")) + (setq group (message-fetch-field "newsgroups")) + (setq name + (cond + (to (concat "*sent mail to " + (or (car (mail-extract-address-components to)) + to) "*")) + ((and group (not (string= group ""))) + (concat "*sent news on " group "*")) + (t "*sent mail*")))) + (unless (string-equal name (buffer-name)) + (rename-buffer name t))))) ;; Push the current buffer onto the list. (when message-max-buffers (setq message-buffer-list @@ -4330,7 +4346,7 @@ the message." (subject (message-fetch-field "Subject"))) (setq subject (if subject - (if decoded + (if decoded subject (mail-decode-encoded-word-string subject)) "")) -- 2.25.1