diff options
Diffstat (limited to 'lisp/mail/rmail.el')
-rw-r--r-- | lisp/mail/rmail.el | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 6b0c93d60cb..9416d049028 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -191,9 +191,6 @@ Its name should end with a slash." :group 'rmail-retrieve :type '(choice (const nil) string)) -(define-obsolete-variable-alias 'rmail-pop-password - 'rmail-remote-password "22.1") - (defcustom rmail-remote-password nil "Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password." @@ -202,9 +199,6 @@ This setting is ignored for mailboxes whose URL already contains a password." :group 'rmail-retrieve :version "22.1") -(define-obsolete-variable-alias 'rmail-pop-password-required - 'rmail-remote-password-required "22.1") - (defcustom rmail-remote-password-required nil "Non-nil if a password is required when reading mail from a remote server." :type 'boolean @@ -857,7 +851,7 @@ that knows the exact ordering of the \\( \\) subexpressions.") (beginning-of-line) (end-of-line) (1 font-lock-comment-delimiter-face nil t) (5 font-lock-comment-face nil t))) - '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$" + '("^\\(X-[a-z0-9-]+\\|In-Reply-To\\|Date\\):.*\\(\n[ \t]+.*\\)*$" . 'rmail-header-name)))) "Additional expressions to highlight in Rmail mode.") @@ -1331,8 +1325,7 @@ Instead, these commands are available: (let ((finding-rmail-file (not (eq major-mode 'rmail-mode)))) (rmail-mode-2) (when (and finding-rmail-file - (null coding-system-for-read) - (default-value 'enable-multibyte-characters)) + (null coding-system-for-read)) (let ((rmail-enable-multibyte t)) (rmail-require-mime-maybe) (rmail-convert-file-maybe) @@ -1759,7 +1752,7 @@ not be a new one). It returns non-nil if it got any new messages." (or (eq buffer-undo-list t) (setq buffer-undo-list nil)) (let ((all-files (if file-name (list file-name) rmail-inbox-list)) - (rmail-enable-multibyte (default-value 'enable-multibyte-characters)) + (rmail-enable-multibyte t) found) (unwind-protect (progn @@ -3399,21 +3392,15 @@ Interactively, empty argument means use same regexp used last time." (defun rmail-simplified-subject (&optional msgnum) "Return the simplified subject of message MSGNUM (or current message). -Simplifying the subject means stripping leading and trailing whitespace, -and typical reply prefixes such as Re:." - (let ((subject (or (rmail-get-header "Subject" msgnum) ""))) +Simplifying the subject means stripping leading and trailing +whitespace, replacing whitespace runs with a single space and +removing prefixes such as Re:, Fwd: and so on and mailing list +tags such as [tag]." + (let ((subject (or (rmail-get-header "Subject" msgnum) "")) + (regexp "\\`[ \t\n]*\\(\\(\\w\\{1,3\\}:\\|\\[[^]]+]\\)[ \t\n]+\\)*")) (setq subject (rfc2047-decode-string subject)) - (if (string-match "\\`[ \t]+" subject) - (setq subject (substring subject (match-end 0)))) - (if (string-match rmail-reply-regexp subject) - (setq subject (substring subject (match-end 0)))) - (if (string-match "[ \t]+\\'" subject) - (setq subject (substring subject 0 (match-beginning 0)))) - ;; If Subject is long, mailers will break it into several lines at - ;; arbitrary places, so normalize whitespace by replacing every - ;; run of whitespace characters with a single space. - (setq subject (replace-regexp-in-string "[ \t\n]+" " " subject)) - subject)) + (setq subject (replace-regexp-in-string regexp "" subject)) + (replace-regexp-in-string "[ \t\n]+" " " subject))) (defun rmail-simplified-subject-regexp () "Return a regular expression matching the current simplified subject. @@ -3802,7 +3789,7 @@ original message into it." (defun rmail-reply (just-sender) "Reply to the current message. -Normally include CC: to all other recipients of original message; +Normally include Cc: to all other recipients of original message; prefix argument means ignore them. While composing the reply, use \\[mail-yank-original] to yank the original message into it." (interactive "P") @@ -3836,7 +3823,7 @@ use \\[mail-yank-original] to yank the original message into it." (unless just-sender (if (mail-fetch-field "mail-followup-to" nil t) ;; If this header field is present, use it instead of the - ;; To and CC fields. + ;; To and Cc fields. (setq to (mail-fetch-field "mail-followup-to" nil t)) (setq cc (or (mail-fetch-field "cc" nil t) "") to (or (mail-fetch-field "to" nil t) "")))))) @@ -4139,6 +4126,7 @@ typically for purposes of moderating a list." "^ *---+ +Original message follows +---+ *$\\|" "^ *---+ +Your message follows +---+ *$\\|" "^|? *---+ +Message text follows: +---+ *|?$\\|" + "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *\n *---+ +The body of the message is [0-9]+ characters long; only the first *\n *---+ +[0-9]+ or so are included here\\. *$\\|" "^ *---+ +This is a copy of \\w+ message, including all the headers.*---+ *$") "A regexp that matches the separator before the text of a failed message.") @@ -4287,7 +4275,7 @@ specifying headers which should not be copied into the new message." (if mail-self-blind (if resending (insert "Resent-Bcc: " (user-login-name) "\n") - (insert "BCC: " (user-login-name) "\n")))) + (insert "Bcc: " (user-login-name) "\n")))) (goto-char (point-min)) (mail-position-on-field (if resending "Resent-To" "To") t)))))) @@ -4527,7 +4515,7 @@ encoded string (and the same mask) will decode the string." (if (= curmask 0) (setq curmask mask)) (setq charmask (% curmask 256)) - (setq curmask (lsh curmask -8)) + (setq curmask (ash curmask -8)) (aset string-vector i (logxor charmask (aref string-vector i))) (setq i (1+ i))) (concat string-vector))) |