"Hefferon, Jim S." <jheffe...@smcvt.edu> writes:

> I did.  I opened a testemacs.tex and said C-h v
> "electric-indent-mode".  Here are the first few lines of the result.
>
> electric-indent-mode is a variable defined in ‘electric.el’.
> Its value is nil
> Original value was t
> Local in buffer testemacs.tex; global value is t
>
> That result looks sensible to me if it means that for .tex files it is
> nil, while for others it is t, maybe?

Yes, that looks Ok in terms of the minor mode is disabled for the .tex
file you're visiting.

Can you please run this procedure:

  • In a terminal, do 'emacs -Q & RET'
  • In the scratch buffer, paste this snippet (assuming that you've
    installed AUCTeX from ELPA):

     (progn
       (package-initialize t)
       (package-activate 'auctex)
       (defun remove-electric-indent-mode ()
         (electric-indent-local-mode -1))
       (add-hook 'LaTeX-mode-hook 'remove-electric-indent-mode))

    put the curser after the last closing parenthesis and hit 'C-x C-e'
  • Now open a .tex file and check the value of the variable
    `electric-indent-mode' (which should be nil)
  • Also check the value of the variable `TeX-newline-function' which
    should be `newline'.

> I put the the whole .emacs, below in case that is helpful, since it is
> only 41 lines.  Other than that, I think I have a standard Ubuntu
> emacs setup.

At a glance, I don't see anything suspicious.

Best, Arash

Reply via email to