diff options
| author | Glenn Morris | 2009-03-05 03:43:32 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-03-05 03:43:32 +0000 |
| commit | 26eb677a6e8674668cffc13b64f078ab9a1a2d97 (patch) | |
| tree | 1603f9886b1ccb2344ecd1e5ff356240e2701fe8 | |
| parent | 7184dd77fb8a6fd85d92f81d782b29a697cf3f1e (diff) | |
| download | emacs-26eb677a6e8674668cffc13b64f078ab9a1a2d97.tar.gz emacs-26eb677a6e8674668cffc13b64f078ab9a1a2d97.zip | |
(rmail-perm-variables): rmail-overlay-list needs to be buffer-local in
the view buffer, not the rmail buffer.
(rmail-ensure-blank-line): New function.
| -rw-r--r-- | lisp/mail/rmail.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index c037c17bcab..af18db931e6 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -1344,6 +1344,7 @@ If so restore the actual mbox message collection." | |||
| 1344 | (set-buffer-multibyte nil) | 1344 | (set-buffer-multibyte nil) |
| 1345 | (with-current-buffer (setq rmail-view-buffer (rmail-generate-viewer-buffer)) | 1345 | (with-current-buffer (setq rmail-view-buffer (rmail-generate-viewer-buffer)) |
| 1346 | (setq buffer-undo-list t) | 1346 | (setq buffer-undo-list t) |
| 1347 | (set (make-local-variable 'rmail-overlay-list) nil) | ||
| 1347 | (set-buffer-multibyte t) | 1348 | (set-buffer-multibyte t) |
| 1348 | ;; Force C-x C-s write Unix EOLs. | 1349 | ;; Force C-x C-s write Unix EOLs. |
| 1349 | (set-buffer-file-coding-system 'undecided-unix)) | 1350 | (set-buffer-file-coding-system 'undecided-unix)) |
| @@ -1352,8 +1353,6 @@ If so restore the actual mbox message collection." | |||
| 1352 | (make-local-variable 'rmail-current-message) | 1353 | (make-local-variable 'rmail-current-message) |
| 1353 | (make-local-variable 'rmail-total-messages) | 1354 | (make-local-variable 'rmail-total-messages) |
| 1354 | (setq rmail-total-messages 0) | 1355 | (setq rmail-total-messages 0) |
| 1355 | (make-local-variable 'rmail-overlay-list) | ||
| 1356 | (setq rmail-overlay-list nil) | ||
| 1357 | (make-local-variable 'rmail-message-vector) | 1356 | (make-local-variable 'rmail-message-vector) |
| 1358 | (make-local-variable 'rmail-msgref-vector) | 1357 | (make-local-variable 'rmail-msgref-vector) |
| 1359 | (make-local-variable 'rmail-inbox-list) | 1358 | (make-local-variable 'rmail-inbox-list) |
| @@ -1964,6 +1963,14 @@ is non-nil if the user has supplied the password interactively. | |||
| 1964 | (setq last-coding-system-used | 1963 | (setq last-coding-system-used |
| 1965 | (coding-system-change-eol-conversion coding 0))))))) | 1964 | (coding-system-change-eol-conversion coding 0))))))) |
| 1966 | 1965 | ||
| 1966 | (defun rmail-ensure-blank-line () | ||
| 1967 | "Ensure a message ends in a blank line. | ||
| 1968 | Call with point at the end of the message." | ||
| 1969 | (unless (bolp) | ||
| 1970 | (insert "\n")) | ||
| 1971 | (unless (looking-back "\n\n") | ||
| 1972 | (insert "\n"))) | ||
| 1973 | |||
| 1967 | (defun rmail-add-mbox-headers () | 1974 | (defun rmail-add-mbox-headers () |
| 1968 | "Validate the RFC2822 format for the new messages. | 1975 | "Validate the RFC2822 format for the new messages. |
| 1969 | Point should be at the first new message. | 1976 | Point should be at the first new message. |
| @@ -2192,6 +2199,10 @@ change; nil means current message." | |||
| 2192 | "Return non-nil if message number MSGNUM has the unseen attribute." | 2199 | "Return non-nil if message number MSGNUM has the unseen attribute." |
| 2193 | (rmail-message-attr-p msgnum "......U")) | 2200 | (rmail-message-attr-p msgnum "......U")) |
| 2194 | 2201 | ||
| 2202 | ;; FIXME rmail-get-labels does some formatting (eg leading space, `;' | ||
| 2203 | ;; between attributes and labels), so this might not do what you want. | ||
| 2204 | ;; Eg see rmail-sort-by-labels. rmail-get-labels could have an | ||
| 2205 | ;; optional `noformat' argument. | ||
| 2195 | (defun rmail-message-labels-p (msg labels) | 2206 | (defun rmail-message-labels-p (msg labels) |
| 2196 | "Return non-nil if message number MSG has labels matching regexp LABELS." | 2207 | "Return non-nil if message number MSG has labels matching regexp LABELS." |
| 2197 | (string-match labels (rmail-get-labels msg))) | 2208 | (string-match labels (rmail-get-labels msg))) |