[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handle empty regexp in `rmail-nonignored-headers'

From: Bastien Guerry
Subject: Handle empty regexp in `rmail-nonignored-headers'
Date: Sun, 10 Feb 2008 16:37:18 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

The default value for `rmail-nonignored-headers' is "^x-spam-status:".
If the user wants to remove this header from the list of non-ignored
headers, she will set `rmail-nonignored-headers' to the empty string.
This will end up in *not* ignoring any header, which is wrong.

This simple patch fixed this -- can I commit it?

--- rmail.el.~1.447.~   2008-02-06 23:54:33.000000000 +0000
+++ rmail.el    2008-02-10 16:30:56.000000000 +0000
@@ -2329,7 +2329,8 @@
          (while (and ignored-headers
                      (re-search-forward ignored-headers nil t))
-           (if (looking-at rmail-nonignored-headers)
+           (if (and (not (equal rmail-nonignored-headers ""))
+                    (looking-at rmail-nonignored-headers))
                (forward-line 1)
              (delete-region (point)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]