[PATCH] D42084: Fix some regular expressions in llvm-mode.el
Tom Tromey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 26 09:34:05 PST 2018
tromey updated this revision to Diff 131607.
tromey added a comment.
Updated the commit message.
Repository:
rL LLVM
https://reviews.llvm.org/D42084
Files:
utils/emacs/llvm-mode.el
Index: utils/emacs/llvm-mode.el
===================================================================
--- utils/emacs/llvm-mode.el
+++ utils/emacs/llvm-mode.el
@@ -1,6 +1,7 @@
;;; llvm-mode.el --- Major mode for the LLVM assembler language.
;; Maintainer: The LLVM team, http://llvm.org/
+;; Version: 1.0
;;; Commentary:
@@ -20,17 +21,17 @@
(defvar llvm-font-lock-keywords
(list
;; Variables
- '("%[-a-zA-Z$\._][-a-zA-Z$\._0-9]*" . font-lock-variable-name-face)
+ '("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face)
;; Labels
- '("[-a-zA-Z$\._0-9]+:" . font-lock-variable-name-face)
+ '("[-a-zA-Z$._0-9]+:" . font-lock-variable-name-face)
;; Unnamed variable slots
'("%[-]?[0-9]+" . font-lock-variable-name-face)
;; Types
`(,(regexp-opt '("void" "i1" "i8" "i16" "i32" "i64" "i128" "float" "double" "type" "label" "opaque") 'symbols) . font-lock-type-face)
;; Integer literals
'("\\b[-]?[0-9]+\\b" . font-lock-preprocessor-face)
;; Floating point constants
- '("\\b[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\b" . font-lock-preprocessor-face)
+ '("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
;; Hex constants
'("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
;; Keywords
@@ -74,11 +75,11 @@
\\{llvm-mode-map}
Runs `llvm-mode-hook' on startup."
(setq font-lock-defaults `(llvm-font-lock-keywords))
- (setq comment-start ";"))
+ (setq-local comment-start ";"))
;; Associate .ll files with llvm-mode
;;;###autoload
-(add-to-list 'auto-mode-alist (cons (purecopy "\\.ll\\'") 'llvm-mode))
+(add-to-list 'auto-mode-alist (cons "\\.ll\\'" 'llvm-mode))
(provide 'llvm-mode)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42084.131607.patch
Type: text/x-patch
Size: 1708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180126/b67d25f6/attachment.bin>
More information about the llvm-commits
mailing list