[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nasm-mode 23cb9de 20/67: Add imenu support for macro defin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nasm-mode 23cb9de 20/67: Add imenu support for macro definitions. |
Date: |
Sun, 29 Aug 2021 11:23:45 -0400 (EDT) |
branch: elpa/nasm-mode
commit 23cb9de0e66479ca5a88397a4ebba3b2eef1cfc2
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add imenu support for macro definitions.
---
nasm-mode.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/nasm-mode.el b/nasm-mode.el
index 80a4964..a58cdf8 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -407,6 +407,12 @@
"\\<$?[-+0-9][-+_0-9A-Fa-fHhXxDdTtQqOoBbYyeE.]*\\>"
"Regexp for `nasm-mode' for matching numeric constants.")
+(defconst nasm-imenu-generic-expression
+ `((nil ,(concat "^\\s-*" nasm-label-regexp) 1)
+ (nil ,(concat (regexp-opt '("%define" "%macro") 'words)
+ "\\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)
@@ -422,6 +428,8 @@
(let ((table (make-syntax-table)))
(prog1 table
(modify-syntax-entry ?_ "w" table)
+ (modify-syntax-entry ?# "w" table)
+ (modify-syntax-entry ?@ "w" table)
(modify-syntax-entry ?\. "w" table)
(modify-syntax-entry ?\? "w" table)
(modify-syntax-entry ?# "w" table)
@@ -474,8 +482,8 @@
(setf font-lock-defaults '(nasm-font-lock-keywords nil :case-fold)
indent-line-function #'nasm-indent-line
comment-start ";"
- imenu-generic-expression
- `((nil ,(concat "^\\s-*" nasm-label-regexp) 1))))
+ imenu-generic-expression nasm-imenu-generic-expression))
+
(provide 'nasm-mode)
- [nongnu] elpa/nasm-mode 6e208d5 29/67: Indent single-commented lines differently., (continued)
- [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
- [nongnu] elpa/nasm-mode 23cb9de 20/67: Add imenu support for macro definitions.,
ELPA Syncer <=
- [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, 2021/08/29
- [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