[llvm] r372904 - [emacs] simplify and improve keyword highlighting in tablegen-mode.el
Bob Haarman via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 11:16:02 PDT 2019
Author: inglorion
Date: Wed Sep 25 11:16:02 2019
New Revision: 372904
URL: http://llvm.org/viewvc/llvm-project?rev=372904&view=rev
Log:
[emacs] simplify and improve keyword highlighting in tablegen-mode.el
Summary:
The keyword and type keyword matchers in tablegen-mode.el checked
for space, newline, tab, or open paren after the regular expression
that matches keywords (or type keywords, respectively). This is
unnecessary, because those regular expressions already include word
boundaries. This change removes the extra check. This also causes
"def" in "def:" to be highlighted as a keyword, which was missed
before.
Reviewers: lattner, MaskRay
Reviewed By: MaskRay
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68002
Modified:
llvm/trunk/utils/emacs/tablegen-mode.el
Modified: llvm/trunk/utils/emacs/tablegen-mode.el
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/emacs/tablegen-mode.el?rev=372904&r1=372903&r2=372904&view=diff
==============================================================================
--- llvm/trunk/utils/emacs/tablegen-mode.el (original)
+++ llvm/trunk/utils/emacs/tablegen-mode.el Wed Sep 25 11:16:02 2019
@@ -39,10 +39,9 @@
'("^[ \t]*\\(@.+\\)" 1 'td-decorators-face)
;; Keywords
- (cons (concat kw "[ \n\t(]") 1)
-
+ kw
;; Type keywords
- (cons (concat type-kw "[ \n\t(]") 1)
+ type-kw
))
"Additional expressions to highlight in TableGen mode.")
(put 'tablegen-mode 'font-lock-defaults '(tablegen-font-lock-keywords))
More information about the llvm-commits
mailing list