diff options
| author | Glenn Morris | 2009-02-13 03:51:16 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-02-13 03:51:16 +0000 |
| commit | 95ca567f4d41692d224062167f5b5bf8c9d0f863 (patch) | |
| tree | afd3e80ca8c2835cab58aa0d72b64692d7a44d1c | |
| parent | 97e92ffbd42de8321677900fbc7dc44b51a4290e (diff) | |
| download | emacs-95ca567f4d41692d224062167f5b5bf8c9d0f863.tar.gz emacs-95ca567f4d41692d224062167f5b5bf8c9d0f863.zip | |
(rmail-summary-vector, rmail-mode-map): Add doc string.
(rmail-set-header-1): If VALUE is nil, remove the header altogether.
(rmail-set-header): Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 27 |
2 files changed, 41 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0533e6558b..31347cd3197 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2009-02-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmailsum.el (msgnum): Remove declaration. | ||
| 4 | (rmail-summary-redo): Add missing initialization value. | ||
| 5 | (rmail-summary-overlay, rmail-summary-mode-map): Add doc string. | ||
| 6 | (rmail-summary-mark-deleted, rmail-summary-deleted-p): | ||
| 7 | Fix skip-chars-forward calls. | ||
| 8 | (rmail-summary-mark-seen): New function. As well as removing the '-' | ||
| 9 | mark, update the summary-vector. (Bug#2135) | ||
| 10 | (rmail-summary-rmail-update, rmail-summary-goto-msg): | ||
| 11 | Use rmail-summary-mark-seen. | ||
| 12 | |||
| 13 | * mail/rmail.el (rmail-summary-vector, rmail-mode-map): Add doc string. | ||
| 14 | |||
| 15 | * mail/unrmail.el (unrmail): When getting message keywords, don't | ||
| 16 | include a leading space, but do include the space after the separating | ||
| 17 | comma. (Bug#2303) | ||
| 18 | |||
| 19 | * mail/rmail.el (rmail-set-header-1): If VALUE is nil, remove the | ||
| 20 | header altogether. | ||
| 21 | (rmail-set-header): Doc fix. | ||
| 22 | * mail/rmailkwd.el (rmail-set-label): Delete the keyword header if all | ||
| 23 | labels are removed. (Bug#2302) | ||
| 24 | |||
| 1 | 2009-02-12 Juri Linkov <juri@jurta.org> | 25 | 2009-02-12 Juri Linkov <juri@jurta.org> |
| 2 | 26 | ||
| 3 | * image-mode.el (image-toggle-display): | 27 | * image-mode.el (image-toggle-display): |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index e54fd01460d..78e6ce9db98 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -564,7 +564,9 @@ by substituting the new message number into the existing list.") | |||
| 564 | 564 | ||
| 565 | (defvar rmail-summary-buffer nil) | 565 | (defvar rmail-summary-buffer nil) |
| 566 | (put 'rmail-summary-buffer 'permanent-local t) | 566 | (put 'rmail-summary-buffer 'permanent-local t) |
| 567 | (defvar rmail-summary-vector nil) | 567 | (defvar rmail-summary-vector nil |
| 568 | "In an Rmail buffer, vector of (newline-terminated) strings. | ||
| 569 | Element N specifies the summary line for message N+1.") | ||
| 568 | (put 'rmail-summary-vector 'permanent-local t) | 570 | (put 'rmail-summary-vector 'permanent-local t) |
| 569 | 571 | ||
| 570 | ;; Rmail buffer swapping variables. | 572 | ;; Rmail buffer swapping variables. |
| @@ -1130,7 +1132,8 @@ The buffer is expected to be narrowed to just the header of the message." | |||
| 1130 | (define-key map [menu-bar move next] | 1132 | (define-key map [menu-bar move next] |
| 1131 | '("Next" . rmail-next-message)) | 1133 | '("Next" . rmail-next-message)) |
| 1132 | 1134 | ||
| 1133 | map)) | 1135 | map) |
| 1136 | "Keymap used in Rmail mode.") | ||
| 1134 | 1137 | ||
| 1135 | ;; Rmail toolbar | 1138 | ;; Rmail toolbar |
| 1136 | (defvar rmail-tool-bar-map | 1139 | (defvar rmail-tool-bar-map |
| @@ -2010,23 +2013,27 @@ If MSGNUM is nil, use the current message." | |||
| 2010 | 2013 | ||
| 2011 | (defun rmail-set-header-1 (name value) | 2014 | (defun rmail-set-header-1 (name value) |
| 2012 | "Subroutine of `rmail-set-header'. | 2015 | "Subroutine of `rmail-set-header'. |
| 2013 | Narrow to header, set header NAME to VALUE, replacing existing if present." | 2016 | Narrow to header, set header NAME to VALUE, replacing existing if present. |
| 2017 | VALUE nil means to remove NAME altogether." | ||
| 2014 | (if (search-forward "\n\n" nil t) | 2018 | (if (search-forward "\n\n" nil t) |
| 2015 | (progn | 2019 | (progn |
| 2016 | (forward-char -1) | 2020 | (forward-char -1) |
| 2017 | (narrow-to-region (point-min) (point)) | 2021 | (narrow-to-region (point-min) (point)) |
| 2018 | (goto-char (point-min)) | 2022 | (goto-char (point-min)) |
| 2019 | (if (re-search-forward (concat "^" (regexp-quote name) ":") nil 'move) | 2023 | (if (re-search-forward (concat "^" (regexp-quote name) ":") nil 'move) |
| 2020 | (progn | 2024 | (if value |
| 2021 | (delete-region (point) (line-end-position)) | 2025 | (progn |
| 2022 | (insert " " value)) | 2026 | (delete-region (point) (line-end-position)) |
| 2023 | (insert name ": " value "\n"))) | 2027 | (insert " " value)) |
| 2028 | (delete-region (line-beginning-position) | ||
| 2029 | (line-beginning-position 2))) | ||
| 2030 | (if value (insert name ": " value "\n")))) | ||
| 2024 | (rmail-error-bad-format))) | 2031 | (rmail-error-bad-format))) |
| 2025 | 2032 | ||
| 2026 | (defun rmail-set-header (name &optional msgnum value) | 2033 | (defun rmail-set-header (name &optional msgnum value) |
| 2027 | "Store VALUE in message header NAME, nil if it has none. | 2034 | "Set message header NAME to VALUE in message number MSGNUM. |
| 2028 | MSGNUM specifies the message number to operate on. | 2035 | If MSGNUM is nil, use the current message. NAME and VALUE are strings. |
| 2029 | If MSGNUM is nil, use the current message." | 2036 | VALUE may also be nil, meaning to remove the header." |
| 2030 | (rmail-apply-in-message msgnum 'rmail-set-header-1 name value) | 2037 | (rmail-apply-in-message msgnum 'rmail-set-header-1 name value) |
| 2031 | ;; Ensure header changes get saved. | 2038 | ;; Ensure header changes get saved. |
| 2032 | ;; (Note replacing a header with an identical copy modifies.) | 2039 | ;; (Note replacing a header with an identical copy modifies.) |