Mercurial > emacs
comparison lisp/mail/rmail.el @ 88256:db2e6586ecf5
(rmail-msgbeg, rmail-msgend): Fix and make obsolete.
(rmail-process-new-messages): Use mail-decode-encoded-word-string
on the subject. Requires mail-parse from Gnus.
(rmail-highlight-headers): Doc.
author | Alex Schroeder <alex@gnu.org> |
---|---|
date | Sat, 21 Jan 2006 15:00:38 +0000 |
parents | 86d5137811c7 |
children | a1b10ae1884b |
comparison
equal
deleted
inserted
replaced
88255:6b913c966ca8 | 88256:db2e6586ecf5 |
---|---|
46 | 46 |
47 (eval-and-compile | 47 (eval-and-compile |
48 (require 'rmaildesc) | 48 (require 'rmaildesc) |
49 (require 'rmailhdr) | 49 (require 'rmailhdr) |
50 (require 'rmailkwd)) | 50 (require 'rmailkwd)) |
51 | |
52 (require 'mail-parse) | |
51 | 53 |
52 (defvar deleted-head) | 54 (defvar deleted-head) |
53 (defvar font-lock-fontified) | 55 (defvar font-lock-fontified) |
54 (defvar mail-abbrev-syntax-table) | 56 (defvar mail-abbrev-syntax-table) |
55 (defvar mail-abbrevs) | 57 (defvar mail-abbrevs) |
1844 (throw 'found t))))) | 1846 (throw 'found t))))) |
1845 | 1847 |
1846 | 1848 |
1847 ;;;; *** Rmail Message Selection And Support *** | 1849 ;;;; *** Rmail Message Selection And Support *** |
1848 | 1850 |
1849 ;; mbox: deprecated. -pmr | 1851 (defun rmail-msgbeg (n) |
1852 (rmail-desc-get-start n)) | |
1853 (make-obsolete 'rmail-msgbeg 'rmail-desc-get-start "22.0") | |
1854 | |
1850 (defun rmail-msgend (n) | 1855 (defun rmail-msgend (n) |
1851 (rmail-desc-get-start n)) | |
1852 | |
1853 ;; mbox: deprecated. -pmr | |
1854 (defun rmail-msgbeg (n) | |
1855 (rmail-desc-get-end n)) | 1856 (rmail-desc-get-end n)) |
1857 (make-obsolete 'rmail-msgend 'rmail-desc-get-end "22.0") | |
1856 | 1858 |
1857 (defun rmail-widen-to-current-msgbeg (function) | 1859 (defun rmail-widen-to-current-msgbeg (function) |
1858 "Call FUNCTION with point at start of internal data of current message. | 1860 "Call FUNCTION with point at start of internal data of current message. |
1859 Assumes that bounds were previously narrowed to display the message in Rmail. | 1861 Assumes that bounds were previously narrowed to display the message in Rmail. |
1860 The bounds are widened enough to move point where desired, then narrowed | 1862 The bounds are widened enough to move point where desired, then narrowed |
1982 keywords | 1984 keywords |
1983 date | 1985 date |
1984 (count-lines start end) | 1986 (count-lines start end) |
1985 (cadr (mail-extract-address-components | 1987 (cadr (mail-extract-address-components |
1986 (rmail-header-get-header "from"))) | 1988 (rmail-header-get-header "from"))) |
1987 (rmail-header-get-header "subject"))) | 1989 (mail-decode-encoded-word-string |
1990 (rmail-header-get-header "subject")))) | |
1988 message-descriptor-list))))) | 1991 message-descriptor-list))))) |
1989 ;; Add the new message data lists to the Rmail message descriptor | 1992 ;; Add the new message data lists to the Rmail message descriptor |
1990 ;; vector. | 1993 ;; vector. |
1991 (rmail-desc-add-descriptors message-descriptor-list) | 1994 (rmail-desc-add-descriptors message-descriptor-list) |
1992 ;; Unless requested otherwise, show the number of new messages. | 1995 ;; Unless requested otherwise, show the number of new messages. |
2178 (symbol-name last-coding-system-used)) | 2181 (symbol-name last-coding-system-used)) |
2179 (rmail-show-message rmail-current-message)) | 2182 (rmail-show-message rmail-current-message)) |
2180 (error "No X-Coding-System header found"))) | 2183 (error "No X-Coding-System header found"))) |
2181 (rmail-header-hide-headers)))))) | 2184 (rmail-header-hide-headers)))))) |
2182 | 2185 |
2183 ;; Find all occurrences of certain fields, and highlight them. | |
2184 (defun rmail-highlight-headers () | 2186 (defun rmail-highlight-headers () |
2187 "Find all occurrences of certain fields, and highlight them. | |
2188 The fields highlighted are determined by `rmail-highlighted-headers'. | |
2189 The face used is stored in the variable `rmail-highlight-face' and | |
2190 defaults to the face `rmail-highlight-face'." | |
2185 ;; Do this only if the system supports faces. | 2191 ;; Do this only if the system supports faces. |
2186 (if (and (fboundp 'internal-find-face) | 2192 (if (and (fboundp 'internal-find-face) |
2187 rmail-highlighted-headers) | 2193 rmail-highlighted-headers) |
2188 (save-excursion | 2194 (save-excursion |
2189 (search-forward "\n\n" nil 'move) | 2195 (search-forward "\n\n" nil 'move) |