emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101216: gnus-score-string: Fix regex


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101216: gnus-score-string: Fix regex for matching extra headers and regexp-quote the match if necessary by Andreas Schwab <address@hidden>.
Date: Mon, 30 Aug 2010 06:32:33 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101216
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2010-08-30 06:32:33 +0000
message:
  gnus-score-string: Fix regex for matching extra headers and regexp-quote the 
match if necessary by Andreas Schwab <address@hidden>.
  
  2009-02-04  Andreas Schwab  <address@hidden>
   * gnus-score.el (gnus-score-string): Fix regex for matching extra
   headers and regexp-quote the match if necessary.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-score.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-08-30 06:28:53 +0000
+++ b/lisp/gnus/ChangeLog       2010-08-30 06:32:33 +0000
@@ -1,3 +1,8 @@
+2009-02-04  Andreas Schwab  <address@hidden>
+
+       * gnus-score.el (gnus-score-string): Fix regex for matching extra
+       headers and regexp-quote the match if necessary.
+
 2009-03-24  Miles Bader  <address@hidden>
 
        * smiley.el (smiley-regexp-alist): Don't delete the semicolon before

=== modified file 'lisp/gnus/gnus-score.el'
--- a/lisp/gnus/gnus-score.el   2010-01-13 08:35:10 +0000
+++ b/lisp/gnus/gnus-score.el   2010-08-30 06:32:33 +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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]