diff options
| author | Richard M. Stallman | 1993-10-09 03:47:15 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-10-09 03:47:15 +0000 |
| commit | c42722e391f564f4aca52e5ce6d7536f7aa84b3b (patch) | |
| tree | d946fd3774313b86a4784e0b345a18dcb9796036 | |
| parent | 51de78c1872d43ddf8a7cbcb772358563ec15bfa (diff) | |
| download | emacs-c42722e391f564f4aca52e5ce6d7536f7aa84b3b.tar.gz emacs-c42722e391f564f4aca52e5ce6d7536f7aa84b3b.zip | |
(rmail): Really don't get new mail if file name was given.
(rmail-reformat-message): Move past Mail-from as well as Summary-line.
(rmail-toggle-header): Likewise.
(rmail-next-undeleted-message): Return t unless hit end of buffer.
(rmail-delete-forward): Likewise.
(mail-unsent-separator): Add `Original message follows'.
(rmail-resend): Handle mail-self-blind.
| -rw-r--r-- | lisp/mail/rmail.el | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 3a6665d6f20..c44284f3779 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -190,7 +190,7 @@ Called with region narrowed to unformatted header.") | |||
| 190 | ;;;###autoload | 190 | ;;;###autoload |
| 191 | (defun rmail (&optional file-name-arg) | 191 | (defun rmail (&optional file-name-arg) |
| 192 | "Read and edit incoming mail. | 192 | "Read and edit incoming mail. |
| 193 | Moves messages into file named by rmail-file-name (a babyl format file) | 193 | Moves messages into file named by `rmail-file-name' (a babyl format file) |
| 194 | and edits that file in RMAIL Mode. | 194 | and edits that file in RMAIL Mode. |
| 195 | Type \\[describe-mode] once editing that file, for a list of RMAIL commands. | 195 | Type \\[describe-mode] once editing that file, for a list of RMAIL commands. |
| 196 | 196 | ||
| @@ -232,7 +232,8 @@ that file, but does not copy any new mail into the file." | |||
| 232 | (rmail-set-message-counters) | 232 | (rmail-set-message-counters) |
| 233 | (rmail-show-message)))) | 233 | (rmail-show-message)))) |
| 234 | (let ((existing-unseen (rmail-first-unseen-message))) | 234 | (let ((existing-unseen (rmail-first-unseen-message))) |
| 235 | (rmail-get-new-mail) | 235 | (or file-name-arg |
| 236 | (rmail-get-new-mail)) | ||
| 236 | ;; Show the first unseen message, which might be from a previous session | 237 | ;; Show the first unseen message, which might be from a previous session |
| 237 | ;; or might have been just read in by rmail-get-new-mail. Must | 238 | ;; or might have been just read in by rmail-get-new-mail. Must |
| 238 | ;; determine already unseen messages first, as rmail-get-new-mail | 239 | ;; determine already unseen messages first, as rmail-get-new-mail |
| @@ -927,7 +928,8 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 927 | 928 | ||
| 928 | ;; Delete the "From ..." line, creating various other headers with | 929 | ;; Delete the "From ..." line, creating various other headers with |
| 929 | ;; information from it if they don't already exist. Now puts the | 930 | ;; information from it if they don't already exist. Now puts the |
| 930 | ;; original line into a mail-from: header line for debugging. | 931 | ;; original line into a mail-from: header line for debugging and for |
| 932 | ;; use by the rmail-output function. | ||
| 931 | (defun rmail-nuke-pinhead-header () | 933 | (defun rmail-nuke-pinhead-header () |
| 932 | (save-excursion | 934 | (save-excursion |
| 933 | (save-restriction | 935 | (save-restriction |
| @@ -990,8 +992,8 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 990 | (insert ?1) | 992 | (insert ?1) |
| 991 | (forward-line 1) | 993 | (forward-line 1) |
| 992 | (let ((case-fold-search t)) | 994 | (let ((case-fold-search t)) |
| 993 | (if (looking-at "Summary-line: ") | 995 | (while (looking-at "Summary-line:\\|Mail-From:") |
| 994 | (forward-line 1))) | 996 | (forward-line 1))) |
| 995 | (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*\n") | 997 | (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*\n") |
| 996 | (delete-region (point) | 998 | (delete-region (point) |
| 997 | (progn (forward-line 1) (point)))) | 999 | (progn (forward-line 1) (point)))) |
| @@ -1031,8 +1033,8 @@ argument causes us to read a file name and use that file as the inbox." | |||
| 1031 | (insert ?0) | 1033 | (insert ?0) |
| 1032 | (forward-line 1) | 1034 | (forward-line 1) |
| 1033 | (let ((case-fold-search t)) | 1035 | (let ((case-fold-search t)) |
| 1034 | (if (looking-at "Summary-Line:") | 1036 | (while (looking-at "Summary-Line:\\|Mail-From:") |
| 1035 | (forward-line 1))) | 1037 | (forward-line 1))) |
| 1036 | (insert "*** EOOH ***\n") | 1038 | (insert "*** EOOH ***\n") |
| 1037 | (forward-char -1) | 1039 | (forward-char -1) |
| 1038 | (search-forward "\n*** EOOH ***\n") | 1040 | (search-forward "\n*** EOOH ***\n") |
| @@ -1330,7 +1332,9 @@ With prefix arg N, moves backward N messages, or forward if N is negative." | |||
| 1330 | (defun rmail-next-undeleted-message (n) | 1332 | (defun rmail-next-undeleted-message (n) |
| 1331 | "Show following non-deleted message. | 1333 | "Show following non-deleted message. |
| 1332 | With prefix arg N, moves forward N non-deleted messages, | 1334 | With prefix arg N, moves forward N non-deleted messages, |
| 1333 | or backward if N is negative." | 1335 | or backward if N is negative. |
| 1336 | |||
| 1337 | Returns t if a new message is being shown, nil otherwise." | ||
| 1334 | (interactive "p") | 1338 | (interactive "p") |
| 1335 | (rmail-maybe-set-message-counters) | 1339 | (rmail-maybe-set-message-counters) |
| 1336 | (let ((lastwin rmail-current-message) | 1340 | (let ((lastwin rmail-current-message) |
| @@ -1344,11 +1348,13 @@ or backward if N is negative." | |||
| 1344 | (if (not (rmail-message-deleted-p current)) | 1348 | (if (not (rmail-message-deleted-p current)) |
| 1345 | (setq lastwin current n (1+ n)))) | 1349 | (setq lastwin current n (1+ n)))) |
| 1346 | (if (/= lastwin rmail-current-message) | 1350 | (if (/= lastwin rmail-current-message) |
| 1347 | (rmail-show-message lastwin)) | 1351 | (progn (rmail-show-message lastwin) |
| 1348 | (if (< n 0) | 1352 | t) |
| 1349 | (message "No previous nondeleted message")) | 1353 | (if (< n 0) |
| 1350 | (if (> n 0) | 1354 | (message "No previous nondeleted message")) |
| 1351 | (message "No following nondeleted message")))) | 1355 | (if (> n 0) |
| 1356 | (message "No following nondeleted message")) | ||
| 1357 | nil))) | ||
| 1352 | 1358 | ||
| 1353 | (defun rmail-previous-undeleted-message (n) | 1359 | (defun rmail-previous-undeleted-message (n) |
| 1354 | "Show previous non-deleted message. | 1360 | "Show previous non-deleted message. |
| @@ -1566,7 +1572,9 @@ Interactively, empty argument means use same regexp used last time." | |||
| 1566 | (defun rmail-delete-forward (&optional backward) | 1572 | (defun rmail-delete-forward (&optional backward) |
| 1567 | "Delete this message and move to next nondeleted one. | 1573 | "Delete this message and move to next nondeleted one. |
| 1568 | Deleted messages stay in the file until the \\[rmail-expunge] command is given. | 1574 | Deleted messages stay in the file until the \\[rmail-expunge] command is given. |
| 1569 | With prefix argument, delete and move backward." | 1575 | With prefix argument, delete and move backward. |
| 1576 | |||
| 1577 | Returns t if a new message is displayed after the delete, or nil otherwise." | ||
| 1570 | (interactive "P") | 1578 | (interactive "P") |
| 1571 | (rmail-set-attribute "deleted" t) | 1579 | (rmail-set-attribute "deleted" t) |
| 1572 | (let ((del-msg rmail-current-message)) | 1580 | (let ((del-msg rmail-current-message)) |
| @@ -1574,8 +1582,8 @@ With prefix argument, delete and move backward." | |||
| 1574 | (save-excursion | 1582 | (save-excursion |
| 1575 | (set-buffer rmail-summary-buffer) | 1583 | (set-buffer rmail-summary-buffer) |
| 1576 | (rmail-summary-mark-deleted del-msg))) | 1584 | (rmail-summary-mark-deleted del-msg))) |
| 1577 | (rmail-next-undeleted-message (if backward -1 1)) | 1585 | (prog1 (rmail-next-undeleted-message (if backward -1 1)) |
| 1578 | (rmail-maybe-display-summary))) | 1586 | (rmail-maybe-display-summary)))) |
| 1579 | 1587 | ||
| 1580 | (defun rmail-delete-backward () | 1588 | (defun rmail-delete-backward () |
| 1581 | "Delete this message and move to previous nondeleted one. | 1589 | "Delete this message and move to previous nondeleted one. |
| @@ -1879,6 +1887,8 @@ typically for purposes of moderating a list." | |||
| 1879 | (insert "Resent-Date: " (mail-rfc822-date) "\n") | 1887 | (insert "Resent-Date: " (mail-rfc822-date) "\n") |
| 1880 | ;;>> Insert resent-to: and bcc if need be. | 1888 | ;;>> Insert resent-to: and bcc if need be. |
| 1881 | (let ((before (point))) | 1889 | (let ((before (point))) |
| 1890 | (if mail-self-blind | ||
| 1891 | (insert "Resent-Bcc: " (user-login-name) "\n")) | ||
| 1882 | (insert "Resent-To: " (if (stringp address) | 1892 | (insert "Resent-To: " (if (stringp address) |
| 1883 | address | 1893 | address |
| 1884 | (mapconcat 'identity address ",\n\t")) | 1894 | (mapconcat 'identity address ",\n\t")) |
| @@ -1907,6 +1917,7 @@ typically for purposes of moderating a list." | |||
| 1907 | "^ *---+ +Returned message +---+ *$\\|" | 1917 | "^ *---+ +Returned message +---+ *$\\|" |
| 1908 | "^ *---+ +Original message +---+ *$\\|" | 1918 | "^ *---+ +Original message +---+ *$\\|" |
| 1909 | "^ *--+ +begin message +--+ *$\\|" | 1919 | "^ *--+ +begin message +--+ *$\\|" |
| 1920 | "^ *---+ +Original message follows +---+ *$\\|" | ||
| 1910 | "^|? *---+ +Message text follows: +---+ *|?$")) | 1921 | "^|? *---+ +Message text follows: +---+ *|?$")) |
| 1911 | 1922 | ||
| 1912 | (defun rmail-retry-failure () | 1923 | (defun rmail-retry-failure () |