diff options
| author | Richard M. Stallman | 2005-03-18 00:12:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-03-18 00:12:08 +0000 |
| commit | 8510cb9473cd99f6b8fb0a5551b0d898b13898fe (patch) | |
| tree | 62f1e43ebd055c0cbc0c860021f84179676ef041 /lisp | |
| parent | 3ca0be33c2c19ae7265ec3e490e036f64fd64ab0 (diff) | |
| download | emacs-8510cb9473cd99f6b8fb0a5551b0d898b13898fe.tar.gz emacs-8510cb9473cd99f6b8fb0a5551b0d898b13898fe.zip | |
(rmail-movemail-program, rmail-pop-password)
(rmail-pop-password-required, rmail-remote-password): Doc fixes.
(rmail-preserve-inbox, rmail-probe, rmail-autodetect): Doc fix.
(rmail-unknown-mail-followup-to): New function.
(rmail-show-message): Use rmail-unknown-mail-followup-to.
(rmail-reply): Recognize Mail-Followup-To and Mail-Reply-To headers.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mail/rmail.el | 71 |
1 files changed, 56 insertions, 15 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 15a42dc585a..559963589a1 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -96,23 +96,26 @@ | |||
| 96 | :group 'rmail) | 96 | :group 'rmail) |
| 97 | 97 | ||
| 98 | (defcustom rmail-movemail-program nil | 98 | (defcustom rmail-movemail-program nil |
| 99 | "If non-nil, name of program for fetching new mail." | 99 | "If non-nil, the file name of the `movemail' program." |
| 100 | :group 'rmail-retrieve | 100 | :group 'rmail-retrieve |
| 101 | :type '(choice (const nil) string)) | 101 | :type '(choice (const nil) string)) |
| 102 | 102 | ||
| 103 | (defcustom rmail-pop-password nil | 103 | (defcustom rmail-pop-password nil |
| 104 | "*Password to use when reading mail from POP server. Please, use rmail-remote-password instead." | 104 | "*Password to use when reading mail from POP server. |
| 105 | Please use `rmail-remote-password' instead." | ||
| 105 | :type '(choice (string :tag "Password") | 106 | :type '(choice (string :tag "Password") |
| 106 | (const :tag "Not Required" nil)) | 107 | (const :tag "Not Required" nil)) |
| 107 | :group 'rmail-obsolete) | 108 | :group 'rmail-obsolete) |
| 108 | 109 | ||
| 109 | (defcustom rmail-pop-password-required nil | 110 | (defcustom rmail-pop-password-required nil |
| 110 | "*Non-nil if a password is required when reading mail from a POP server. Please, use rmail-remote-password-required instead." | 111 | "*Non-nil if a password is required when reading mail from a POP server. |
| 112 | Please use rmail-remote-password-required instead." | ||
| 111 | :type 'boolean | 113 | :type 'boolean |
| 112 | :group 'rmail-obsolete) | 114 | :group 'rmail-obsolete) |
| 113 | 115 | ||
| 114 | (defcustom rmail-remote-password nil | 116 | (defcustom rmail-remote-password nil |
| 115 | "*Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password." | 117 | "*Password to use when reading mail from a remote server. |
| 118 | This setting is ignored for mailboxes whose URL already contains a password." | ||
| 116 | :type '(choice (string :tag "Password") | 119 | :type '(choice (string :tag "Password") |
| 117 | (const :tag "Not Required" nil)) | 120 | (const :tag "Not Required" nil)) |
| 118 | :set-after '(rmail-pop-password) | 121 | :set-after '(rmail-pop-password) |
| @@ -160,8 +163,7 @@ please report it with \\[report-emacs-bug].") | |||
| 160 | (defvar rmail-encoded-remote-password nil) | 163 | (defvar rmail-encoded-remote-password nil) |
| 161 | 164 | ||
| 162 | (defcustom rmail-preserve-inbox nil | 165 | (defcustom rmail-preserve-inbox nil |
| 163 | "*Non-nil if incoming mail should be left in the user's inbox, | 166 | "*Non-nil means leave incoming mail in the user's inbox--don't delete it." |
| 164 | rather than deleted, after it is retrieved." | ||
| 165 | :type 'boolean | 167 | :type 'boolean |
| 166 | :group 'rmail-retrieve) | 168 | :group 'rmail-retrieve) |
| 167 | 169 | ||
| @@ -171,8 +173,8 @@ rather than deleted, after it is retrieved." | |||
| 171 | :type '(repeat (directory))) | 173 | :type '(repeat (directory))) |
| 172 | 174 | ||
| 173 | (defun rmail-probe (prog) | 175 | (defun rmail-probe (prog) |
| 174 | "Determine what flavor of movemail PROG is by executing it with --version | 176 | "Determine what flavor of movemail PROG is. |
| 175 | command line option and analyzing its output." | 177 | We do this by executing it with `--version' and analyzing its output." |
| 176 | (with-temp-buffer | 178 | (with-temp-buffer |
| 177 | (let ((tbuf (current-buffer))) | 179 | (let ((tbuf (current-buffer))) |
| 178 | (buffer-disable-undo tbuf) | 180 | (buffer-disable-undo tbuf) |
| @@ -191,10 +193,10 @@ command line option and analyzing its output." | |||
| 191 | 'emacs)))))) | 193 | 'emacs)))))) |
| 192 | 194 | ||
| 193 | (defun rmail-autodetect () | 195 | (defun rmail-autodetect () |
| 194 | "Determine and return the flavor of `movemail' program in use. If | 196 | "Determine and return the file name of the `movemail' program. |
| 195 | rmail-movemail-program is set, use it. Otherwise, look for `movemail' | 197 | If `rmail-movemail-program' is non-nil, use it. |
| 196 | in the path constructed by appending rmail-movemail-search-path, | 198 | Otherwise, look for `movemail' in the directories in |
| 197 | exec-path and exec-directory." | 199 | `rmail-movemail-search-path', those in `exec-path', and `exec-directory'." |
| 198 | (if rmail-movemail-program | 200 | (if rmail-movemail-program |
| 199 | (rmail-probe rmail-movemail-program) | 201 | (rmail-probe rmail-movemail-program) |
| 200 | (catch 'scan | 202 | (catch 'scan |
| @@ -2609,6 +2611,39 @@ change the invisible header text." | |||
| 2609 | (interactive) | 2611 | (interactive) |
| 2610 | (rmail-show-message rmail-current-message)) | 2612 | (rmail-show-message rmail-current-message)) |
| 2611 | 2613 | ||
| 2614 | (defun rmail-unknown-mail-followup-to () | ||
| 2615 | "Handle a \"Mail-Followup-To\" header field with an unknown mailing list. | ||
| 2616 | Ask the user whether to add that list name to `mail-mailing-lists'." | ||
| 2617 | (save-restriction | ||
| 2618 | (rmail-narrow-to-non-pruned-header) | ||
| 2619 | (let ((mail-followup-to (mail-fetch-field "mail-followup-to" nil t))) | ||
| 2620 | (when mail-followup-to | ||
| 2621 | (let ((addresses | ||
| 2622 | (split-string | ||
| 2623 | (mail-strip-quoted-names mail-followup-to) | ||
| 2624 | ",[[:space:]]+" t))) | ||
| 2625 | (dolist (addr addresses) | ||
| 2626 | (when (and (not (member addr mail-mailing-lists)) | ||
| 2627 | (not | ||
| 2628 | ;; taken from rmailsum.el | ||
| 2629 | (string-match | ||
| 2630 | (or rmail-user-mail-address-regexp | ||
| 2631 | (concat "^\\(" | ||
| 2632 | (regexp-quote (user-login-name)) | ||
| 2633 | "\\($\\|@\\)\\|" | ||
| 2634 | (regexp-quote | ||
| 2635 | (or user-mail-address | ||
| 2636 | (concat (user-login-name) "@" | ||
| 2637 | (or mail-host-address | ||
| 2638 | (system-name))))) | ||
| 2639 | "\\>\\)")) | ||
| 2640 | addr)) | ||
| 2641 | (y-or-n-p | ||
| 2642 | (format "Add `%s' to `mail-mailing-lists'? " | ||
| 2643 | addr))) | ||
| 2644 | (customize-save-variable 'mail-mailing-lists | ||
| 2645 | (cons addr mail-mailing-lists))))))))) | ||
| 2646 | |||
| 2612 | (defun rmail-show-message (&optional n no-summary) | 2647 | (defun rmail-show-message (&optional n no-summary) |
| 2613 | "Show message number N (prefix argument), counting from start of file. | 2648 | "Show message number N (prefix argument), counting from start of file. |
| 2614 | If summary buffer is currently displayed, update current message there also." | 2649 | If summary buffer is currently displayed, update current message there also." |
| @@ -2677,8 +2712,9 @@ If summary buffer is currently displayed, update current message there also." | |||
| 2677 | (rmail-display-labels) | 2712 | (rmail-display-labels) |
| 2678 | (if (eq rmail-enable-mime t) | 2713 | (if (eq rmail-enable-mime t) |
| 2679 | (funcall rmail-show-mime-function) | 2714 | (funcall rmail-show-mime-function) |
| 2680 | (setq rmail-view-buffer rmail-buffer) | 2715 | (setq rmail-view-buffer rmail-buffer)) |
| 2681 | ) | 2716 | (when mail-mailing-lists |
| 2717 | (rmail-unknown-mail-followup-to)) | ||
| 2682 | (rmail-highlight-headers) | 2718 | (rmail-highlight-headers) |
| 2683 | (if transient-mark-mode (deactivate-mark)) | 2719 | (if transient-mark-mode (deactivate-mark)) |
| 2684 | (run-hooks 'rmail-show-message-hook) | 2720 | (run-hooks 'rmail-show-message-hook) |
| @@ -3367,9 +3403,14 @@ use \\[mail-yank-original] to yank the original message into it." | |||
| 3367 | (progn (search-forward "\n*** EOOH ***\n") | 3403 | (progn (search-forward "\n*** EOOH ***\n") |
| 3368 | (beginning-of-line) (point))))) | 3404 | (beginning-of-line) (point))))) |
| 3369 | (setq from (mail-fetch-field "from") | 3405 | (setq from (mail-fetch-field "from") |
| 3370 | reply-to (or (mail-fetch-field "reply-to" nil t) | 3406 | reply-to (or (if just-sender |
| 3407 | (mail-fetch-field "mail-reply-to" nil t) | ||
| 3408 | (mail-fetch-field "mail-followup-to" nil t)) | ||
| 3409 | (mail-fetch-field "reply-to" nil t) | ||
| 3371 | from) | 3410 | from) |
| 3372 | cc (and (not just-sender) | 3411 | cc (and (not just-sender) |
| 3412 | ;; mail-followup-to, if given, overrides cc. | ||
| 3413 | (not (mail-fetch-field "mail-followup-to" nil t)) | ||
| 3373 | (mail-fetch-field "cc" nil t)) | 3414 | (mail-fetch-field "cc" nil t)) |
| 3374 | subject (mail-fetch-field "subject") | 3415 | subject (mail-fetch-field "subject") |
| 3375 | date (mail-fetch-field "date") | 3416 | date (mail-fetch-field "date") |