Emacs: Set tab-width to 4 in XML
parent
9f9370d196
commit
2ac066840b
|
@ -278,6 +278,10 @@ e-mail."
|
|||
;; (toggle-truncate-lines) ; This seems to slow down Emacs.
|
||||
(turn-off-auto-fill))
|
||||
(add-hook 'sgml-mode-hook 'sgml-setup)
|
||||
(with-eval-after-load 'nxml-mode
|
||||
(defvaralias 'nxml-child-indent 'tab-width))
|
||||
;;; Because XML is hard to read.
|
||||
(add-hook 'nxml-mode-hook 'turn-on-tab-width-to-4)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Finalization
|
||||
|
|
|
@ -441,6 +441,10 @@ This does not interfere with `subword-mode'."
|
|||
"Unconditionally turn off Linum mode."
|
||||
(linum-mode 0))
|
||||
|
||||
(defun turn-on-tab-width-to-4 ()
|
||||
"Unconditionally set tab width to 4."
|
||||
(setq tab-width 4))
|
||||
|
||||
(defun turn-on-tab-width-to-8 ()
|
||||
"Unconditionally set tab width to 8."
|
||||
(setq tab-width 8))
|
||||
|
|
Loading…
Reference in New Issue