I configure indent-tabs-mode
to t
so that tab characters are used for indentation by default. AUCTeX apparently changes the value of indent-tabs-mode
to nil
and uses some other system for handling leading indentation, and there are many customization variables in the groups "TeX Indentation" and "LaTeX Indentation". As far as I've found so far, these variables only allow you to change the number of space characters used for indentation. How can I configure AUCTeX to use tab characters for indentation?
1 Answer
AUCTeX doesn't use tabs at all for indentation. This is done by changing two variables: indent-tabs-mode
and indent-line-function
. Thus, in order to get tabs back you can restore the default values of these variables (t
for for the former and indent-line-function
for the latter). You can do this in your init file with a hook:
(add-hook 'LaTeX-mode-hook
(lambda ()
(setq indent-tabs-mode t
indent-line-function 'indent-relative)))
indent-line-function
to'indent-relative
(its default value), in addition to settingindent-tabs-mode
tot
. Is this what you want?indent-line-function
. I've added a'LaTeX-mode-hook
to force both of these variables and will see how it goes! If you want to submit this as an answer I'll accept it.