branch: elpa/nasm-mode commit e53433c3a5f4a5680e3734014c3954831dd85df6 Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Better label font lock matching. --- nasm-mode.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nasm-mode.el b/nasm-mode.el index 39eef65..af3e9fa 100644 --- a/nasm-mode.el +++ b/nasm-mode.el @@ -389,7 +389,7 @@ "NASM preprocessor directives (pptok.c) for `nasm-mode'.")) (defconst nasm-label-regexp - "\\s-*[a-zA-Z0-9_.?][a-zA-Z0-9_$#@~.?]*\\>" + "\\<[a-zA-Z_.?][a-zA-Z0-9_$#@~.?]*\\>" "Regexp for `nasm-mode'.") (defconst nasm-font-lock-keywords @@ -398,9 +398,10 @@ (,(regexp-opt nasm-prefix 'words) . font-lock-keyword-face) (,(regexp-opt nasm-directives 'words) . font-lock-builtin-face) (,(regexp-opt nasm-pp-directives 'words) . font-lock-preprocessor-face) - (,(concat "^" nasm-label-regexp "\\s-*:") . font-lock-function-name-face) + (,(concat "^\\s-*" nasm-label-regexp "\\s-*:") + . font-lock-function-name-face) (,(regexp-opt nasm-instructions 'words) . font-lock-keyword-face) - (,(concat "^" nasm-label-regexp) . font-lock-function-name-face)) + (,(concat "^\\s-*" nasm-label-regexp) . font-lock-function-name-face)) "Keywords for `nasm-mode'.") (defconst nasm-mode-syntax-table