diff options
| author | Richard M. Stallman | 1990-12-24 22:05:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1990-12-24 22:05:55 +0000 |
| commit | 0f91ee7e0170c018b412d1c012590b66e0a579e8 (patch) | |
| tree | 40560f5b3a82895528b4cd6f1fbf01f999100e5a /lisp | |
| parent | 408a4c8f5e5ed1a096dbc774c2318653ab555e6f (diff) | |
| download | emacs-0f91ee7e0170c018b412d1c012590b66e0a579e8.tar.gz emacs-0f91ee7e0170c018b412d1c012590b66e0a579e8.zip | |
*** empty log message ***
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mail/rmailout.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 988ba78a114..a02c2260fd3 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el | |||
| @@ -22,6 +22,10 @@ | |||
| 22 | (defvar rmail-delete-after-output nil | 22 | (defvar rmail-delete-after-output nil |
| 23 | "*Non-nil means automatically delete a message that is copied to a file.") | 23 | "*Non-nil means automatically delete a message that is copied to a file.") |
| 24 | 24 | ||
| 25 | (defvar rmail-output-file-alist nil | ||
| 26 | "*Alist matching regexps to suggested output Rmail files. | ||
| 27 | This is a list of elements of the form (REGEXP . FILENAME).") | ||
| 28 | |||
| 25 | (defun rmail-output-to-rmail-file (count file-name) | 29 | (defun rmail-output-to-rmail-file (count file-name) |
| 26 | "Append the current message to an Rmail file named FILE-NAME. | 30 | "Append the current message to an Rmail file named FILE-NAME. |
| 27 | If the file does not exist, ask if it should be created. | 31 | If the file does not exist, ask if it should be created. |
| @@ -35,7 +39,17 @@ starting with the current one. Deleted messages are skipped and don't count." | |||
| 35 | (file-name-nondirectory rmail-last-rmail-file) | 39 | (file-name-nondirectory rmail-last-rmail-file) |
| 36 | ") ") | 40 | ") ") |
| 37 | (file-name-directory rmail-last-rmail-file) | 41 | (file-name-directory rmail-last-rmail-file) |
| 38 | rmail-last-rmail-file))) | 42 | (let (answer tail) |
| 43 | (setq tail rmail-output-file-alist) | ||
| 44 | ;; Suggest a file based on a pattern match. | ||
| 45 | (while (and tail (not answer)) | ||
| 46 | (save-excursion | ||
| 47 | (goto-char (point-min)) | ||
| 48 | (if (re-search-forward (car (car tail)) nil t) | ||
| 49 | (setq answer (cdr (car tail)))) | ||
| 50 | (setq tail (cdr tail)))) | ||
| 51 | ;; If not suggestions, use same file as last time. | ||
| 52 | (or answer rmail-last-rmail-file))))) | ||
| 39 | (setq file-name (expand-file-name file-name)) | 53 | (setq file-name (expand-file-name file-name)) |
| 40 | (setq rmail-last-rmail-file file-name) | 54 | (setq rmail-last-rmail-file file-name) |
| 41 | (rmail-maybe-set-message-counters) | 55 | (rmail-maybe-set-message-counters) |