changeset 110029:4c792e557a24

gnus-score-string: Fix regex for matching extra headers and regexp-quote the match if necessary by Andreas Schwab <schwab@suse.de>. 2009-02-04 Andreas Schwab <schwab@suse.de> * gnus-score.el (gnus-score-string): Fix regex for matching extra headers and regexp-quote the match if necessary.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 30 Aug 2010 06:32:33 +0000
parents 2547676f6961
children 1c251ca4a0d8
files lisp/gnus/ChangeLog lisp/gnus/gnus-score.el
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Mon Aug 30 06:28:53 2010 +0000
+++ b/lisp/gnus/ChangeLog	Mon Aug 30 06:32:33 2010 +0000
@@ -1,3 +1,8 @@
+2009-02-04  Andreas Schwab  <schwab@suse.de>
+
+	* gnus-score.el (gnus-score-string): Fix regex for matching extra
+	headers and regexp-quote the match if necessary.
+
 2009-03-24  Miles Bader  <miles@gnu.org>
 
 	* smiley.el (smiley-regexp-alist): Don't delete the semicolon before
--- a/lisp/gnus/gnus-score.el	Mon Aug 30 06:28:53 2010 +0000
+++ b/lisp/gnus/gnus-score.el	Mon Aug 30 06:32:33 2010 +0000
@@ -2055,8 +2055,11 @@
 
 	  ;; Evil hackery to make match usable in non-standard headers.
 	  (when extra
-	    (setq match (concat "[ (](" extra " \\. \"[^)]*"
-				match "[^\"]*\")[ )]")
+	    (setq match (concat "[ (](" extra " \\. \"\\([^\"]*\\\\\"\\)*[^\"]*"
+				(if (eq search-func 're-search-forward)
+				    match
+				  (regexp-quote match))
+				"\\([^\"]*\\\\\"\\)*[^\"]*\")[ )]")
 		  search-func 're-search-forward)) ; XXX danger?!?
 
 	  (cond