branch: elpa/nasm-mode commit 02c2450e6b47b109199ccf4e07ec88288de3a88b Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Assume things that start with dot are labels. --- nasm-mode.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nasm-mode.el b/nasm-mode.el index 38487f3..e90d881 100644 --- a/nasm-mode.el +++ b/nasm-mode.el @@ -510,7 +510,13 @@ "NASM preprocessor directives (pptok.c) for `nasm-mode'.")) (defconst nasm-label-regexp - "\\(\\_<[a-zA-Z_.?][a-zA-Z0-9_$#@~.?]*\\_>\\)\\s-*:" + (let ((head "[a-zA-Z_?]") + (tail "[a-zA-Z0-9_$#@~?]")) + (concat "\\(?:" + "\\(\\_<\\." head tail "*\\_>\\)\\(?:\\s-*:\\)?" + "\\|" + "\\(\\_<" head tail "*\\_>\\)\\s-*:" + "\\)")) "Regexp for `nasm-mode' for matching labels.") (defconst nasm-constant-regexp