aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-03-03 04:08:09 +0000
committerGlenn Morris2009-03-03 04:08:09 +0000
commit66be413e7a5d23974156e0486069326151da45e1 (patch)
tree515429ce7b6584fb99b4e57ad3e7ba7fc4a96e75
parent4b12219b6d4504204f93cc9e895a11c81d1ae5e8 (diff)
downloademacs-66be413e7a5d23974156e0486069326151da45e1.tar.gz
emacs-66be413e7a5d23974156e0486069326151da45e1.zip
(rmail-highlighted-headers, rmail-highlight, rmail-header-name): Doc fixes.
(rmail-show-message-verbose-min): Add :version. (rmail-highlight-headers): Add doc string. Simplify.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/mail/rmail.el38
2 files changed, 35 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 34ae0aa1af6..06db01271a2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12009-03-03 Glenn Morris <rgm@gnu.org>
2
3 * mail/rmail.el (rmail-highlighted-headers, rmail-highlight)
4 (rmail-header-name): Doc fixes.
5 (rmail-show-message-verbose-min): Add :version.
6 (rmail-highlight-headers): Add doc string. Simplify.
7
8 * mail/rmailsum.el (rmail-summary-scroll-between-messages)
9 (rmail-summary-line-count-flag, rmail-summary-by-regexp): Doc fixes.
10 (rmail-summary-mode-map): Bind C-o to output-as-seen, not output.
11 Make the output menu-items consistent with rmail-mode-map.
12
12009-03-03 Kenichi Handa <handa@m17n.org> 132009-03-03 Kenichi Handa <handa@m17n.org>
2 14
3 * files.el (basic-save-buffer-1): Set car part of 15 * files.el (basic-save-buffer-1): Set car part of
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index dbd4fcf75af..c037c17bcab 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -379,19 +379,22 @@ If nil, display all header fields except those matched by
379;;;###autoload 379;;;###autoload
380(defcustom rmail-highlighted-headers "^From:\\|^Subject:" 380(defcustom rmail-highlighted-headers "^From:\\|^Subject:"
381 "Regexp to match Header fields that Rmail should normally highlight. 381 "Regexp to match Header fields that Rmail should normally highlight.
382A value of nil means don't highlight." 382A value of nil means don't highlight. Uses the face `rmail-highlight'."
383 :type 'regexp 383 :type 'regexp
384 :group 'rmail-headers) 384 :group 'rmail-headers)
385 385
386(defface rmail-highlight 386(defface rmail-highlight
387 '((t (:inherit highlight))) 387 '((t (:inherit highlight)))
388 "Face to use for highlighting the most important header fields." 388 "Face to use for highlighting the most important header fields.
389The variable `rmail-highlighted-headers' specifies which headers."
389 :group 'rmail-headers 390 :group 'rmail-headers
390 :version "22.1") 391 :version "22.1")
391 392
392(defface rmail-header-name 393(defface rmail-header-name
393 '((t (:inherit font-lock-function-name-face))) 394 '((t (:inherit font-lock-function-name-face)))
394 "Face to use for highlighting the header names." 395 "Face to use for highlighting the header names.
396The variable `rmail-font-lock-keywords' specifies which headers
397get highlighted."
395 :group 'rmail-headers 398 :group 'rmail-headers
396 :version "23.1") 399 :version "23.1")
397 400
@@ -474,6 +477,13 @@ still the current message in the Rmail buffer.")
474(defvar rmail-mmdf-delim2 "^\001\001\001\001\n" 477(defvar rmail-mmdf-delim2 "^\001\001\001\001\n"
475 "Regexp marking the end of an mmdf message.") 478 "Regexp marking the end of an mmdf message.")
476 479
480;; FIXME Post-mbox, this is now unused.
481;; In Emacs-22, this was called:
482;; i) the very first time a message was shown.
483;; ii) when toggling the headers to the normal state, every time.
484;; It's not clear what it should do now, since there is nothing that
485;; records when a message is shown for the first time (unseen is not
486;; necessarily the same thing).
477(defcustom rmail-message-filter nil 487(defcustom rmail-message-filter nil
478 "If non-nil, a filter function for new messages in RMAIL. 488 "If non-nil, a filter function for new messages in RMAIL.
479Called with region narrowed to the message, including headers, 489Called with region narrowed to the message, including headers,
@@ -750,6 +760,9 @@ The first parenthesized expression should match the MIME-charset name.")
750this expression, you must change the code in `rmail-nuke-pinhead-header' 760this expression, you must change the code in `rmail-nuke-pinhead-header'
751that knows the exact ordering of the \\( \\) subexpressions.") 761that knows the exact ordering of the \\( \\) subexpressions.")
752 762
763;; FIXME the rmail-header-name headers ought to be customizable.
764;; It seems a bit arbitrary, for example, that all of the Date: line
765;; gets highlighted.
753(defvar rmail-font-lock-keywords 766(defvar rmail-font-lock-keywords
754 ;; These are all matched case-insensitively. 767 ;; These are all matched case-insensitively.
755 (eval-when-compile 768 (eval-when-compile
@@ -2511,7 +2524,8 @@ N defaults to the current message."
2511(defcustom rmail-show-message-verbose-min 200000 2524(defcustom rmail-show-message-verbose-min 200000
2512 "Message size at which to show progress messages for displaying it." 2525 "Message size at which to show progress messages for displaying it."
2513 :type 'integer 2526 :type 'integer
2514 :group 'rmail) 2527 :group 'rmail
2528 :version "23.1")
2515 2529
2516(defun rmail-show-message-1 (&optional msg) 2530(defun rmail-show-message-1 (&optional msg)
2517 "Show message MSG (default: current message) using `rmail-view-buffer'. 2531 "Show message MSG (default: current message) using `rmail-view-buffer'.
@@ -2728,22 +2742,16 @@ using the coding system CODING."
2728 (symbol-name coding)))) 2742 (symbol-name coding))))
2729 (rmail-show-message)))))) 2743 (rmail-show-message))))))
2730 2744
2731;; Find all occurrences of certain fields, and highlight them.
2732(defun rmail-highlight-headers () 2745(defun rmail-highlight-headers ()
2733 ;; Do this only if the system supports faces. 2746 "Highlight the headers specified by `rmail-highlighted-headers'.
2734 (if (and (fboundp 'internal-find-face) 2747Uses the face `rmail-highlight'."
2735 rmail-highlighted-headers) 2748 (if rmail-highlighted-headers
2736 (save-excursion 2749 (save-excursion
2737 (search-forward "\n\n" nil 'move) 2750 (search-forward "\n\n" nil 'move)
2738 (save-restriction 2751 (save-restriction
2739 (narrow-to-region (point-min) (point)) 2752 (narrow-to-region (point-min) (point))
2740 (let ((case-fold-search t) 2753 (let ((case-fold-search t)
2741 (inhibit-read-only t) 2754 (inhibit-read-only t)
2742 ;; Highlight with boldface if that is available.
2743 ;; Otherwise use the `highlight' face.
2744 (face (or 'rmail-highlight
2745 (if (face-differs-from-default-p 'bold)
2746 'bold 'highlight)))
2747 ;; List of overlays to reuse. 2755 ;; List of overlays to reuse.
2748 (overlays rmail-overlay-list)) 2756 (overlays rmail-overlay-list))
2749 (goto-char (point-min)) 2757 (goto-char (point-min))
@@ -2762,12 +2770,12 @@ using the coding system CODING."
2762 (progn 2770 (progn
2763 (setq overlay (car overlays) 2771 (setq overlay (car overlays)
2764 overlays (cdr overlays)) 2772 overlays (cdr overlays))
2765 (overlay-put overlay 'face face) 2773 (overlay-put overlay 'face 'rmail-highlight)
2766 (move-overlay overlay beg (point))) 2774 (move-overlay overlay beg (point)))
2767 ;; Make a new overlay and add it to 2775 ;; Make a new overlay and add it to
2768 ;; rmail-overlay-list. 2776 ;; rmail-overlay-list.
2769 (setq overlay (make-overlay beg (point))) 2777 (setq overlay (make-overlay beg (point)))
2770 (overlay-put overlay 'face face) 2778 (overlay-put overlay 'face 'rmail-highlight)
2771 (setq rmail-overlay-list 2779 (setq rmail-overlay-list
2772 (cons overlay rmail-overlay-list)))))))))) 2780 (cons overlay rmail-overlay-list))))))))))
2773 2781