auctex
[Top][All Lists]
Advanced

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

Turn off auto-indent


From: Hefferon, Jim S.
Subject: Turn off auto-indent
Date: Tue, 5 Dec 2023 14:18:18 +0000

Hello,

Apologies if this is a dopey question and I am missing something simple.  I'd 
like to turn off auto indent, so that hitting <Enter> no longer tries to match 
to the enclosing environments.

Until recently, this accomplished what I wanted.

;; Turn off auto indent in AUC TeX
;; https://tex.stackexchange.com/q/468047/339
;; and https://emacs.stackexchange.com/a/30148
(defun remove-electric-indent-mode ()
  (electric-indent-local-mode -1))
(add-hook 'LaTeX-mode-hook 'remove-electric-indent-mode)
(add-hook 'tex-mode-hook 'remove-electric-indent-mode)

But now I've updated my Ubuntu to the latest and it no longer works.    I've 
tried a good amount of fooling with selected constants but always miss 
something.   For instance my latest is these in my .emacs. 

(setq LaTeX-indent-level 0)
(setq LaTeX-item-indent 0)
(setq TeX-brace-indent-level 0)

These result in indenting when you are leaving an environment, so if I indent 
by hand as here

xxxx
  \begin{itemize}

  \end{itemize}test

xxxx

and put the cursor at the start of "test" and hit <Enter> then "test" lines up 
with the backslash in \end{itemize}.

I'd be grateful for any pointers.  Thanks,
Jim Hefferon



reply via email to

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