]> git.eshelyaron.com Git - emacs.git/commitdiff
gnus-score-string: Fix regex for matching extra headers and regexp-quote the match...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Aug 2010 06:32:33 +0000 (06:32 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 30 Aug 2010 06:32:33 +0000 (06:32 +0000)
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.

lisp/gnus/ChangeLog
lisp/gnus/gnus-score.el

index d55f89c28b68a4eef6a5926be2d0a5461589820a..5c148b825e65345a66035884cab66605776bea36 100644 (file)
@@ -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
index 26c01229e332545712d261c5d911a632daa57f99..8cfd3d5ad0142976ee0947cfd82b4219eba36819 100644 (file)
@@ -2055,8 +2055,11 @@ score in `gnus-newsgroup-scored' by SCORE."
 
          ;; 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