emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/nasm-mode b595921 11/67: Add nasm-colon key binding.


From: ELPA Syncer
Subject: [nongnu] elpa/nasm-mode b595921 11/67: Add nasm-colon key binding.
Date: Sun, 29 Aug 2021 11:23:43 -0400 (EDT)

branch: elpa/nasm-mode
commit b595921533e91041f825cd90a27f2cf41556ae42
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]