Mercurial > emacs
comparison lisp/mail/rmail.el @ 102405:7289f3ee7996
(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.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 05 Mar 2009 03:43:32 +0000 |
parents | 968d71b7a967 |
children | 735c4ccc513f |
comparison
equal
deleted
inserted
replaced
102404:b2bd32bf5b5e | 102405:7289f3ee7996 |
---|---|
1342 (make-local-variable 'rmail-buffer) | 1342 (make-local-variable 'rmail-buffer) |
1343 (setq rmail-buffer (current-buffer)) | 1343 (setq rmail-buffer (current-buffer)) |
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)) |
1350 (make-local-variable 'rmail-summary-buffer) | 1351 (make-local-variable 'rmail-summary-buffer) |
1351 (make-local-variable 'rmail-summary-vector) | 1352 (make-local-variable 'rmail-summary-vector) |
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) |
1360 ;; Provide default set of inboxes for primary mail file ~/RMAIL. | 1359 ;; Provide default set of inboxes for primary mail file ~/RMAIL. |
1361 (and (null rmail-inbox-list) | 1360 (and (null rmail-inbox-list) |
1962 (with-current-buffer destination | 1961 (with-current-buffer destination |
1963 (setq buffer-file-coding-system | 1962 (setq buffer-file-coding-system |
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. |
1970 An error is signalled if the new messages are not RFC2822 | 1977 An error is signalled if the new messages are not RFC2822 |
1971 compliant. | 1978 compliant. |
2190 | 2197 |
2191 (defun rmail-message-unseen-p (msgnum) | 2198 (defun rmail-message-unseen-p (msgnum) |
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))) |
2198 | 2209 |
2199 ;;;; *** Rmail Message Selection And Support *** | 2210 ;;;; *** Rmail Message Selection And Support *** |