[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nasm-mode 7131afb 63/67: Change nasm-use-tabs to nasm-afte
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nasm-mode 7131afb 63/67: Change nasm-use-tabs to nasm-after-mnemonic-whitespace |
Date: |
Sun, 29 Aug 2021 11:23:53 -0400 (EDT) |
branch: elpa/nasm-mode
commit 7131afbcc18cc4fc0845dc763169575195a9f01d
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Change nasm-use-tabs to nasm-after-mnemonic-whitespace
Instead of nil and t, it accepts :tab, :space, or nil.
---
nasm-mode.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/nasm-mode.el b/nasm-mode.el
index 91515e1..66a0938 100644
--- a/nasm-mode.el
+++ b/nasm-mode.el
@@ -51,9 +51,10 @@
"Indentation level for `nasm-mode'."
:group 'nasm-mode)
-; NOTE (sonictk) Allow for customizing behaviour of inserting tabs/spaces
-(defcustom nasm-use-tabs (default-value 't)
- "Indentation for `nasm-mode' to use tabs/spaces. Set to ``nil`` to use
spaces and ``t`` to use tabs."
+(defcustom nasm-after-mnemonic-whitespace :tab
+ "In `nasm-mode', determines the whitespace to use after mnemonics.
+This can be :tab, :space, or nil (do nothing)."
+ :type '(choice (const :tab) (const :space) (const nil))
:group 'nasm-mode)
(defface nasm-registers
@@ -626,12 +627,10 @@ is not immediately after a mnemonic; otherwise, we insert
a tab."
(bti (progn (back-to-indentation) (point))))
(buffer-substring-no-properties bti point)))))
(if (string-match nasm-full-instruction-regexp before)
- (if (equal nasm-use-tabs t)
- ;; We are immediately after an instruction, just insert a tab
- (insert "\t")
- ; If tabs are not set in prefs, use the default instead
- (insert-char ?\s nasm-basic-offset)
- )
+ ;; We are immediately after a mnemonic
+ (cl-case nasm-after-mnemonic-whitespace
+ (:tab (insert "\t"))
+ (:space (insert-char ?\s nasm-basic-offset)))
;; We're literally anywhere else, indent the whole line
(let ((orig (- (point-max) (point))))
(back-to-indentation)
- [nongnu] elpa/nasm-mode d95a12d 45/67: Add section name highlighting back., (continued)
- [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, 2021/08/29
- [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 <=
- [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
- [nongnu] elpa/nasm-mode 63d4433 62/67: allow for customization of tabs/spaces behaviour, ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 4b06918 02/67: Allow labels without colons., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode 9e8e7c9 15/67: Add constant syntax highlighting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode ac9ce5d 18/67: Require imenu (to ensure automatic buffer-local)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/nasm-mode ca9d65f 26/67: Default nasm-basic-offset to tab-width., ELPA Syncer, 2021/08/29