emacs-diffs
[Top][All Lists]
Advanced

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

master a5b48e2: vhdl-mode: remove minor obstacle to static checking


From: Mattias Engdegård
Subject: master a5b48e2: vhdl-mode: remove minor obstacle to static checking
Date: Thu, 12 Nov 2020 08:58:45 -0500 (EST)

branch: master
commit a5b48e25fe966ed67f314b77903335e8238ce8f9
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    vhdl-mode: remove minor obstacle to static checking
    
    * lisp/progmodes/vhdl-mode.el (vhdl-directive-keywords-regexp):
    Remove unnecessary global variable.
    (vhdl-words-init): Remove assignment.
    (vhdl-font-lock-init): Inline expression.  Use regexp-opt.
---
 lisp/progmodes/vhdl-mode.el | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 3d66483..f288fac 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -5336,9 +5336,6 @@ Key bindings:
 (defvar vhdl-reserved-words-regexp nil
   "Regexp for additional reserved words.")
 
-(defvar vhdl-directive-keywords-regexp nil
-  "Regexp for compiler directive keywords.")
-
 (defun vhdl-upcase-list (condition list)
   "Upcase all elements in LIST based on CONDITION."
   (when condition
@@ -5416,9 +5413,6 @@ Key bindings:
                  (concat vhdl-forbidden-syntax "\\|"))
                (regexp-opt vhdl-reserved-words)
                "\\)\\>"))
-  (setq vhdl-directive-keywords-regexp
-       (concat "\\<\\(" (mapconcat 'regexp-quote
-                                   vhdl-directive-keywords "\\|") "\\)\\>"))
   (vhdl-abbrev-list-init))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -13631,7 +13625,10 @@ This does background highlighting of translate-off 
regions.")
                            vhdl-template-prompt-syntax ">\\)")
                    2 'vhdl-font-lock-prompt-face t)
              (list (concat "--\\s-*"
-                           vhdl-directive-keywords-regexp "\\s-+\\(.*\\)$")
+                            "\\<"
+                            (regexp-opt vhdl-directive-keywords t)
+                            "\\>"
+                            "\\s-+\\(.*\\)$")
                    2 'vhdl-font-lock-directive-face t)
              ;; highlight c-preprocessor directives
              (list "^#[ \t]*\\(\\w+\\)\\([ \t]+\\(\\w+\\)\\)?"



reply via email to

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