[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nasm-mode 1127620 44/67: Fix breakage caused by recent reg
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nasm-mode 1127620 44/67: Fix breakage caused by recent regexp changes. |
Date: |
Sun, 29 Aug 2021 11:23:50 -0400 (EDT) |
branch: elpa/nasm-mode
commit 1127620430134d6a1f39bca50905eac09cfa829d
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Fix breakage caused by recent regexp changes.
---
nasm-mode.el | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/nasm-mode.el b/nasm-mode.el
index f0fc63e..57861db 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -75,7 +75,12 @@
(defface nasm-labels
'((t :inherit (font-lock-function-name-face)))
- "Face for label."
+ "Face for nonlocal labels."
+ :group 'nasm-mode-faces)
+
+(defface nasm-local-labels
+ '((t :inherit (font-lock-function-name-face)))
+ "Face for local labels."
:group 'nasm-mode-faces)
(defface nasm-constant
@@ -509,14 +514,16 @@
"__UTC_TIME_NUM__" "__POSIX_TIME__" " __PASS__" "SECTALIGN")
"NASM preprocessor directives (pptok.c) for `nasm-mode'."))
+(defconst nasm-nonlocal-label-rexexp
+ "\\(\\_<[a-zA-Z_?][a-zA-Z0-9_$#@~?]*\\_>\\)\\s-*:"
+ "Regexp for `nasm-mode' for matching nonlocal labels.")
+
+(defconst nasm-local-label-regexp
+ "\\(\\_<\\.[a-zA-Z_?][a-zA-Z0-9_$#@~?]*\\_>\\)\\(?:\\s-*:\\)?"
+ "Regexp for `nasm-mode' for matching local labels.")
+
(defconst nasm-label-regexp
- (let ((head "[a-zA-Z_?]")
- (tail "[a-zA-Z0-9_$#@~?]"))
- (concat "\\(?:"
- "\\(\\_<\\." head tail "*\\_>\\)\\(?:\\s-*:\\)?"
- "\\|"
- "\\(\\_<" head tail "*\\_>\\)\\s-*:"
- "\\)"))
+ (concat nasm-nonlocal-label-rexexp "\\|" nasm-local-label-regexp)
"Regexp for `nasm-mode' for matching labels.")
(defconst nasm-constant-regexp
@@ -529,20 +536,20 @@
(regexp-opt ,keywords 'words)))
(defconst nasm-imenu-generic-expression
- `((nil ,(concat "^\\s-*" nasm-label-regexp) 1)
+ `((nil ,(concat "^\\s-*" nasm-nonlocal-label-rexexp) 1)
(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)
- (,(nasm--opt nasm-registers) . 'nasm-registers)
+ `((,(nasm--opt nasm-registers) . 'nasm-registers)
(,(nasm--opt nasm-prefix) . 'nasm-prefix)
(,(nasm--opt nasm-types) . 'nasm-types)
(,(nasm--opt nasm-instructions) . 'nasm-instructions)
(,(nasm--opt nasm-directives) . 'nasm-directives)
(,(nasm--opt nasm-pp-directives) . 'nasm-preprocessor)
- (,(concat "^\\s-*" nasm-label-regexp) (1 'nasm-labels))
+ (,(concat "^\\s-*" nasm-nonlocal-label-rexexp) (1 'nasm-labels))
+ (,(concat "^\\s-*" nasm-local-label-regexp) (1 'nasm-local-labels))
(,nasm-constant-regexp . 'nasm-constant))
"Keywords for `nasm-mode'.")
- [nongnu] elpa/nasm-mode 2259c7d 34/67: Properly distinguish word and symbol constituents., (continued)
- [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
- [nongnu] elpa/nasm-mode 23cb9de 20/67: Add imenu support for macro definitions., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 2c87509 36/67: Correct boundaries in syntax highlighting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 78818f1 39/67: Remove a few more garbage "instructions.", ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 1127620 44/67: Fix breakage caused by recent regexp changes.,
ELPA Syncer <=
- [nongnu] elpa/nasm-mode e7fa960 49/67: make indent-line-function local, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 7131afb 63/67: Change nasm-use-tabs to nasm-after-mnemonic-whitespace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode c0a002b 13/67: Add minimal imenu support., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode dbfb995 17/67: Add a couple TODO items., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 4b28c7d 37/67: Update header comment., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 3047d7c 41/67: Add nasm-join-line., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode d990ed9 51/67: Bump to 1.1.1., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 63d4433 62/67: allow for customization of tabs/spaces behaviour, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 4b06918 02/67: Allow labels without colons., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 9e8e7c9 15/67: Add constant syntax highlighting., ELPA Syncer, 2021/08/29