Emacs highlighting in Asm mode

I'm looking for the equivalent of c-indent-leveland ruby-indent-levelfor asm-mode. That is, I want to indent 4 spaces, and I want them to be replaced by spaces.

What I saw tells me that this does not exist for asm-mode. Can someone please tell me what is wrong?

I also tried this: Set 4 spaces in Emacs in text mode so that there is no av.

I tried:

(setq tab-width 4)
(setq indent-line-function 'insert-tab)
(setq asm-indent-level 4)

However, this works:

(custom-set-variables
 '(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120))))

But I wonder if there is a way to determine what is only for asm-mode. What if I wanted to keep the default tab behavior for other modes?

+3
source share
2 answers

asm-mode tab-to-tab-stop , --. , . asm, gas-mode asm86-mode.

+2

Emacs (?) . H-m , , "asm-mode-hook". , , :

(add-hook 'asm-mode-hook (lambda()
                           (setq tab-width 4)
                           (setq indent-line-function 'insert-tab)
                           (setq asm-indent-level 4)))

. - indent-line , . , , , . , (make-variable-buffer-local VARIABLE).

0

Source: https://habr.com/ru/post/1741795/


All Articles