I'm using the comment
package for the comment
environment. This environment cannot be indented, just like the verbatim
environment. How can I configure AUCTeX to not indent this environment? Thanks in advance.
1 Answer
The steps explained here worked for me. Specifically, I added the following to my .emacs
file.
(add-to-list 'LaTeX-verbatim-environments "pycode")
(add-to-list 'LaTeX-indent-environment-list
'("pycode" current-indentation))
More information is available under (info "(auctex)Verbatim content")
and (info "(auctex)Indenting")
.
After I did an eval-region
on these lines, I had to reload the .tex
file that I was working on in Emacs for them to take effect.
("comment" current-indentation)
to theLaTeX-indent-environment-list
work?; see gnu.org/software/auctex/manual/auctex/Indenting.htmlLaTeX-verbatim-environments
. (but perhaps the OP does not care for verbatim like treatment of hiscomment
environment)(add-to-list 'LaTeX-verbatim-environments "comment")
and evaluated the command, but I still don't see any change in the AUCTeX behavior.(add-to-list 'LaTeX-indent-environment-list '("comment" current-indentation))
. You can put something like this in your.emacs
:(eval-after-load "latex" (progn (make-local-variable 'LaTeX-indent-environment-list) (add-to-list 'LaTeX-indent-environment-list '("comment" current-indentation))))