From: Bastien Guerry Date: Sun, 10 Feb 2008 22:10:09 +0000 (+0000) Subject: (rmail-nonignored-headers): Allow to be nil. X-Git-Tag: emacs-pretest-23.0.90~8031 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=be16d955c87a73ec4d585f5d001971f90bcccd17;p=emacs.git (rmail-nonignored-headers): Allow to be nil. (rmail-clear-headers): Don't check `rmail-nonignored-headers' when it is nil. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3157aeef6e6..0e664149b94 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-02-10 Bastien Guerry + + * mail/rmail.el (rmail-nonignored-headers): Allow to be nil. + (rmail-clear-headers): Don't check `rmail-nonignored-headers' when + it is nil. + 2008-02-10 Daiki Ueno * epg-config.el: Expand the contents of epg-package-info.el. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 7ea89ab84bf..ed434ad75cb 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -299,6 +299,7 @@ go to that message and type \\[rmail-toggle-header] twice." "*Regexp to match X header fields that Rmail should show. This regexp overrides `rmail-ignored-headers'; if both this regexp and that one match a certain header field, Rmail shows the field. +If this is nil, ignore all header fields in `rmail-ignored-headers'. This variable is used for reformatting the message header, which normally happens once for each message, @@ -306,7 +307,7 @@ when you view the message for the first time in Rmail. To make a change in this variable take effect for a message that you have already viewed, go to that message and type \\[rmail-toggle-header] twice." - :type 'regexp + :type '(choice (const nil) (regexp)) :group 'rmail-headers) ;;;###autoload @@ -2329,7 +2330,8 @@ unless they also match `rmail-nonignored-headers'." (while (and ignored-headers (re-search-forward ignored-headers nil t)) (beginning-of-line) - (if (looking-at rmail-nonignored-headers) + (if (and rmail-nonignored-headers + (looking-at rmail-nonignored-headers)) (forward-line 1) (delete-region (point) (save-excursion