branch: elpa/nasm-mode
commit b595921533e91041f825cd90a27f2cf41556ae42
Author: Christopher Wellons <[email protected]>
Commit: Christopher Wellons <[email protected]>
Add nasm-colon key binding.
---
nasm-mode.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/nasm-mode.el b/nasm-mode.el
index af3e9fa..0a21da5 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -420,6 +420,18 @@
(modify-syntax-entry ?\` "\"" table)))
"Syntax table for `nasm-mode'.")
+(defvar nasm-mode-map
+ (let ((map (make-sparse-keymap)))
+ (prog1 map
+ (define-key map (kbd ":") #'nasm-colon)))
+ "Key bindings for `nasm-mode'.")
+
+(defun nasm-colon ()
+ "Insert a colon and convert the current line into a label."
+ (interactive)
+ (call-interactively 'self-insert-command)
+ (nasm-indent-line))
+
(defmacro nasm--opt (keywords)
"Prepare KEYWORDS for `looking-at'."
`(eval-when-compile