GNU bug report logs -
#13173
[PATCH] sieve-mode.el: Keywords should be word delimited.
Previous Next
Reported by: "Akinori MUSHA" <knu <at> iDaemons.org>
Date: Thu, 13 Dec 2012 16:58:03 UTC
Severity: minor
Tags: patch
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#13173: [PATCH] sieve-mode.el: Keywords should be word delimited.
which was filed against the emacs,gnus package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 13173 <at> debbugs.gnu.org.
--
13173: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13173
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Version: 24.4
Thanks; applied.
[Message part 3 (message/rfc822, inline)]
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 <knu <at> iDaemons.org>
+
+ * sieve-mode.el (sieve-font-lock-keywords): Keywords should be word
+ delimited.
+
2012-12-06 Sam Steingold <sds <at> gnu.org>
* 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/
This bug report was last modified 12 years and 148 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.