emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/go-mode 3139c0f 107/495: fix regexp-opt usage for emacs <2


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 3139c0f 107/495: fix regexp-opt usage for emacs <24
Date: Sat, 7 Aug 2021 09:04:53 -0400 (EDT)

branch: elpa/go-mode
commit 3139c0f803243d8b2be262b33113641dfe6818e2
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    fix regexp-opt usage for emacs <24
---
 go-mode.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index 5abc5cb..a60876f 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -68,10 +68,12 @@
   "Syntax table for Go mode.")
 
 (defun go--build-font-lock-keywords ()
+  ;; we cannot use 'symbols in regexp-opt because emacs <24 doesn't
+  ;; understand that
   (append
-   `((,(regexp-opt go-mode-keywords 'symbols) . font-lock-keyword-face)
-     (,(regexp-opt go-builtins 'symbols) . font-lock-builtin-face)
-     (,(regexp-opt go-constants 'symbols) . font-lock-constant-face)
+   `((,(concat "\\_<"(regexp-opt go-mode-keywords) "\\_>") . 
font-lock-keyword-face)
+     (,(concat "\\_<" (regexp-opt go-builtins) "\\_>") . 
font-lock-builtin-face)
+     (,(concat "\\_<" (regexp-opt go-constants) "\\_>") . 
font-lock-constant-face)
      (,go-func-regexp 1 font-lock-function-name-face)) ;; function (not 
method) name
 
    (if go-fontify-function-calls



reply via email to

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