unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Handle empty regexp in `rmail-nonignored-headers'
@ 2008-02-10 16:37 Bastien Guerry
  2008-02-10 19:34 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bastien Guerry @ 2008-02-10 16:37 UTC (permalink / raw)
  To: emacs-devel

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))
 	    (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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-11  1:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-10 16:37 Handle empty regexp in `rmail-nonignored-headers' Bastien Guerry
2008-02-10 19:34 ` Stefan Monnier
2008-02-10 22:25   ` Bastien
2008-02-10 20:03 ` Eli Zaretskii
2008-02-11  0:17 ` Richard Stallman
2008-02-11  1:01   ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).