branch: externals/rainbow-mode
commit ac68593018ef3555e64ea592d72334f4e3e39209
Author: Lars Ingebrigtsen <la...@gnus.org>
Commit: Lars Ingebrigtsen <la...@gnus.org>

    Avoid coloring #define in rainbow-mode
    
    * rainbow-mode.el (rainbow-hexadecimal-colors-font-lock-keywords):
    Ensure that the thing we're coloring is an entire word.  This
    avoids coloring bits of things like #define (bug#39578).
---
 rainbow-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rainbow-mode.el b/rainbow-mode.el
index e6bf1bde80..14bf442ea5 100644
--- a/rainbow-mode.el
+++ b/rainbow-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: Julien Danjou <jul...@danjou.info>
 ;; Keywords: faces
-;; Version: 1.0.5
+;; Version: 1.0.6
 
 ;; This file is part of GNU Emacs.
 
@@ -45,9 +45,9 @@
 ;;; Hexadecimal colors
 
 (defvar rainbow-hexadecimal-colors-font-lock-keywords
-  '(("[^&]\\(#\\(?:[0-9a-fA-F]\\{3\\}\\)\\{1,4\\}\\)"
+  '(("[^&]\\(#\\(?:[0-9a-fA-F]\\{3\\}\\)\\{1,4\\}\\)\\b"
      (1 (rainbow-colorize-itself 1)))
-    ("^\\(#\\(?:[0-9a-fA-F]\\{3\\}\\)\\{1,4\\}\\)"
+    ("^\\(#\\(?:[0-9a-fA-F]\\{3\\}\\)\\{1,4\\}\\)\\b"
      (0 (rainbow-colorize-itself)))
     
("[Rr][Gg][Bb]:[0-9a-fA-F]\\{1,4\\}/[0-9a-fA-F]\\{1,4\\}/[0-9a-fA-F]\\{1,4\\}"
      (0 (rainbow-colorize-itself)))

Reply via email to