[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nasm-mode 2940e4f 27/67: Run all regexp-opt at compile tim
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nasm-mode 2940e4f 27/67: Run all regexp-opt at compile time (faster loads). |
Date: |
Sun, 29 Aug 2021 11:23:46 -0400 (EDT) |
branch: elpa/nasm-mode
commit 2940e4f21ce1e29093bb17aaefba1e343cc331f0
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Run all regexp-opt at compile time (faster loads).
---
nasm-mode.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/nasm-mode.el b/nasm-mode.el
index fc3c701..6156c0b 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -420,19 +420,24 @@
"\\<$?[-+0-9][-+_0-9A-Fa-fHhXxDdTtQqOoBbYyeE.]*\\>"
"Regexp for `nasm-mode' for matching numeric constants.")
+(defmacro nasm--opt (keywords)
+ "Prepare KEYWORDS for `looking-at'."
+ `(eval-when-compile
+ (regexp-opt ,keywords 'words)))
+
(defconst nasm-imenu-generic-expression
`((nil ,(concat "^\\s-*" nasm-label-regexp) 1)
- (nil ,(concat (regexp-opt '("%define" "%macro") 'words)
+ (nil ,(concat (nasm--opt '("%define" "%macro"))
"\\s-+\\([a-zA-Z0-9_$#@~.?]+\\)") 2))
"Expressions for `imenu-generic-expression'.")
(defconst nasm-font-lock-keywords
`(("\\<\\.[a-zA-Z0-9_$#@~.?]+\\>" . font-lock-type-face)
- (,(regexp-opt nasm-registers 'words) . font-lock-variable-name-face)
- (,(regexp-opt nasm-prefix 'words) . font-lock-builtin-face)
- (,(regexp-opt nasm-instructions 'words) . font-lock-builtin-face)
- (,(regexp-opt nasm-directives 'words) . font-lock-keyword-face)
- (,(regexp-opt nasm-pp-directives 'words) . font-lock-preprocessor-face)
+ (,(nasm--opt nasm-registers) . font-lock-variable-name-face)
+ (,(nasm--opt nasm-prefix) . font-lock-builtin-face)
+ (,(nasm--opt nasm-instructions) . font-lock-builtin-face)
+ (,(nasm--opt nasm-directives) . font-lock-keyword-face)
+ (,(nasm--opt nasm-pp-directives) . font-lock-preprocessor-face)
(,(concat "^\\s-*" nasm-label-regexp) (1 font-lock-function-name-face))
(,nasm-constant-regexp . font-lock-constant-face))
"Keywords for `nasm-mode'.")
@@ -467,11 +472,6 @@
(call-interactively #'self-insert-command)
(nasm-indent-line))
-(defmacro nasm--opt (keywords)
- "Prepare KEYWORDS for `looking-at'."
- `(eval-when-compile
- (regexp-opt ,keywords 'words)))
-
(defun nasm-indent-line ()
"Indent current line as NASM assembly code."
(interactive)
- [nongnu] elpa/nasm-mode 96a06c0 65/67: Support M-; (comment-dwim function), (continued)
- [nongnu] elpa/nasm-mode 96a06c0 65/67: Support M-; (comment-dwim function), ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 65ca654 67/67: make comment functions local, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode b384240 04/67: Include prefixes in smart indentation., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 3da1454 12/67: Add a docstring to nasm-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2a5768a 16/67: Indent commented code differently., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode f357905 19/67: Fix up README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode a715d4e 22/67: Use sharp quote in call-interactively., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 9f05280 23/67: Adjust package description., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e641c8a 24/67: Flesh out a little more commentary., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode f62c103 25/67: Add preprocessor directives:, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2940e4f 27/67: Run all regexp-opt at compile time (faster loads).,
ELPA Syncer <=
- [nongnu] elpa/nasm-mode 6e208d5 29/67: Indent single-commented lines differently., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e015f41 30/67: Split out types, like word, dword, qword, etc., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 42ee760 32/67: Allow to change faces used by nasm-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2259c7d 34/67: Properly distinguish word and symbol constituents., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e978f6e 35/67: Don't use 3-argument <= (requires 24.4)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode d95a12d 45/67: Add section name highlighting back., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 64e450d 54/67: Allow inserting tabs immediately after a mnemonic, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 8ce1831 55/67: Use nasm-basic-offset instead of a literal 8, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e9acee3 09/67: Expand the syntax table for labels., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode e53433c 10/67: Better label font lock matching., ELPA Syncer, 2021/08/29