From: Katsumi Yamaoka Date: Mon, 30 Aug 2010 06:32:33 +0000 (+0000) Subject: gnus-score-string: Fix regex for matching extra headers and regexp-quote the match... X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~211 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ec440915cc95c6be5065a0739d8e7673ee38c9d;p=emacs.git gnus-score-string: Fix regex for matching extra headers and regexp-quote the match if necessary by Andreas Schwab . 2009-02-04 Andreas Schwab * gnus-score.el (gnus-score-string): Fix regex for matching extra headers and regexp-quote the match if necessary. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d55f89c28b6..5c148b825e6 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2009-02-04 Andreas Schwab + + * gnus-score.el (gnus-score-string): Fix regex for matching extra + headers and regexp-quote the match if necessary. + 2009-03-24 Miles Bader * smiley.el (smiley-regexp-alist): Don't delete the semicolon before diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 26c01229e33..8cfd3d5ad01 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -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