emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#13173: closed ([PATCH] sieve-mode.el: Keywords sho


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#13173: closed ([PATCH] sieve-mode.el: Keywords should be word delimited.)
Date: Fri, 14 Dec 2012 04:29:02 +0000

Your message dated Thu, 13 Dec 2012 23:27:38 -0500
with message-id <address@hidden>
and subject line Re: bug#13173: [PATCH] sieve-mode.el: Keywords should be word 
delimited.
has caused the debbugs.gnu.org bug report #13173,
regarding [PATCH] sieve-mode.el: Keywords should be word delimited.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
13173: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13173
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] sieve-mode.el: Keywords should be word delimited. Date: Fri, 14 Dec 2012 00:03:13 +0900
In sieve-mode, font-lock keywords will wrongly match because the
regexp patterns are unaware of word boundaries.

For example, if you put an action command "notify", it is highlighted
as "not"+"if"+y.

Apply the following simple patch to fix that.

---
 lisp/gnus/ChangeLog     | 5 +++++
 lisp/gnus/sieve-mode.el | 9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 601ed0c..42b3e59 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-13  Akinori MUSHA  <address@hidden>
+
+       * sieve-mode.el (sieve-font-lock-keywords): Keywords should be word
+       delimited.
+
 2012-12-06  Sam Steingold  <address@hidden>
 
        * gnus-start.el (gnus-before-resume-hook): Add.
diff --git a/lisp/gnus/sieve-mode.el b/lisp/gnus/sieve-mode.el
index f49f767..32abbfe 100644
--- a/lisp/gnus/sieve-mode.el
+++ b/lisp/gnus/sieve-mode.el
@@ -131,14 +131,17 @@
   (eval-when-compile
     (list
      ;; control commands
-     (cons (regexp-opt '("require" "if" "else" "elsif" "stop"))
+     (cons (regexp-opt '("require" "if" "else" "elsif" "stop")
+                       'words)
           'sieve-control-commands-face)
      ;; action commands
-     (cons (regexp-opt '("fileinto" "redirect" "reject" "keep" "discard"))
+     (cons (regexp-opt '("fileinto" "redirect" "reject" "keep" "discard")
+                       'words)
           'sieve-action-commands-face)
      ;; test commands
      (cons (regexp-opt '("address" "allof" "anyof" "exists" "false"
-                        "true" "header" "not" "size" "envelope"))
+                        "true" "header" "not" "size" "envelope")
+                       'words)
           'sieve-test-commands-face)
      (cons "\\Sw+:\\sw+"
           'sieve-tagged-arguments-face))))
-- 
1.8.0.1

-- 
Akinori MUSHA / http://akinori.org/



--- End Message ---
--- Begin Message --- Subject: Re: bug#13173: [PATCH] sieve-mode.el: Keywords should be word delimited. Date: Thu, 13 Dec 2012 23:27:38 -0500 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.4

Thanks; applied.


--- End Message ---

reply via email to

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