emacs-devel
[Top][All Lists]
Advanced

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

Re: Handle empty regexp in `rmail-nonignored-headers'


From: Stefan Monnier
Subject: Re: Handle empty regexp in `rmail-nonignored-headers'
Date: Sun, 10 Feb 2008 14:34:42 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (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?

I'd rather allow rmail-nonignored-headers to be nil (to mean "don't
unignore any headers") and let "" have its standard meaning of "match
everything/everywhere".


        Stefan


> --- 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))
>           (beginning-of-line)
> -         (if (looking-at rmail-nonignored-headers)
> +         (if (and (not (equal rmail-nonignored-headers ""))
> +                  (looking-at rmail-nonignored-headers))
>               (forward-line 1)
>             (delete-region (point)
>                            (save-excursion

> -- 
> Bastien




reply via email to

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