From 142f2a7b4a11f6164bbaf018b8ed21ef8ee2a0af Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Mon, 30 Aug 2010 00:42:42 +0200 Subject: [PATCH] Fix regex for matching extra headers and regexp-quote the match if necessary. From Andreas Schwab --- lisp/ChangeLog | 5 +++++ lisp/gnus-score.el | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8bb5efa09..a77f68833 100644 --- a/lisp/ChangeLog +++ b/lisp/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-score.el b/lisp/gnus-score.el index 26c01229e..8cfd3d5ad 100644 --- a/lisp/gnus-score.el +++ b/lisp/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 -- 2.25.1