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
    Does adding ("comment" current-indentation) to the LaTeX-indent-environment-list work?; see gnu.org/software/auctex/manual/auctex/Indenting.html – René B. Christensen Jan 22 '16 at 18:27
  • @RenéB.Christensen additionnally I find in my customization file that my custom verbatim environments are added to LaTeX-verbatim-environments. (but perhaps the OP does not care for verbatim like treatment of his comment environment) – user4686 Jan 23 '16 at 21:44
  • I added (add-to-list 'LaTeX-verbatim-environments "comment") and evaluated the command, but I still don't see any change in the AUCTeX behavior. – Jeff Jan 29 '16 at 19:07
  • @Jeff - One approach could be: (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)))) – Arash Esbati Feb 4 '16 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.