llvm.org GIT mirror llvm / 4aef7d1
Fix some regular expressions in llvm-mode.el. In some cases it was using "\" unnecessarily. In another case it needed an additional "\" to properly indicate a numbered sub-match. Make comment-start buffer-local in llvm-mode.el llvm-mode was setting comment-start globally. However, it is better to only set it locally in the current buffer. Don't use purecopy in llvm-mode.el There's no reason to use purecopy in llvm-mode.el. purecopy is only needed for files that are dumped in emacs. Add a version header to llvm-mode.el Adding a version header to llvm-mode.el allows it to be installed by the Emacs package manager. There are not many requirements on the version number; however it is useful to users to bump it when something significant changes. Here I've chosen just to start at 1.0. Patch by Tom Tromey! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323705 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 2 years ago
1 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 ;;; llvm-mode.el --- Major mode for the LLVM assembler language.
11
22 ;; Maintainer: The LLVM team, http://llvm.org/
3 ;; Version: 1.0
34
45 ;;; Commentary:
56
1920 (defvar llvm-font-lock-keywords
2021 (list
2122 ;; Variables
22 '("%[-a-zA-Z$\._][-a-zA-Z$\._0-9]*" . font-lock-variable-name-face)
23 '("%[-a-zA-Z$._][-a-zA-Z$._0-9]*" . font-lock-variable-name-face)
2324 ;; Labels
24 '("[-a-zA-Z$\._0-9]+:" . font-lock-variable-name-face)
25 '("[-a-zA-Z$._0-9]+:" . font-lock-variable-name-face)
2526 ;; Unnamed variable slots
2627 '("%[-]?[0-9]+" . font-lock-variable-name-face)
2728 ;; Types
2930 ;; Integer literals
3031 '("\\b[-]?[0-9]+\\b" . font-lock-preprocessor-face)
3132 ;; Floating point constants
32 '("\\b[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?\\b" . font-lock-preprocessor-face)
33 '("\\b[-+]?[0-9]+.[0-9]*\\([eE][-+]?[0-9]+\\)?\\b" . font-lock-preprocessor-face)
3334 ;; Hex constants
3435 '("\\b0x[0-9A-Fa-f]+\\b" . font-lock-preprocessor-face)
3536 ;; Keywords
7374 \\{llvm-mode-map}
7475 Runs `llvm-mode-hook' on startup."
7576 (setq font-lock-defaults `(llvm-font-lock-keywords))
76 (setq comment-start ";"))
77 (setq-local comment-start ";"))
7778
7879 ;; Associate .ll files with llvm-mode
7980 ;;;###autoload
80 (add-to-list 'auto-mode-alist (cons (purecopy "\\.ll\\'") 'llvm-mode))
81 (add-to-list 'auto-mode-alist (cons "\\.ll\\'" 'llvm-mode))
8182
8283 (provide 'llvm-mode)
8384