bug-auctex
[Top][All Lists]
Advanced

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

bug#24412: 11.89; Wrong DocTeX-mode


From: Piet van Oostrum
Subject: bug#24412: 11.89; Wrong DocTeX-mode
Date: Mon, 12 Sep 2016 11:55:19 +0200

David Kastrup wrote:

[...]

 > Also necessary because if you write
 > 
 > mode: LaTeX
 > 
 > (or any other capitalization) in a file variable block, Emacs will
 > invariably call latex-mode .
 > 
I didn't realize that. Not nice.

 > > I had put something in docTeX-mode-hook, and I didn't see much
 > > evidence of it happening. There was an error in it, but I did not get
 > > an error message. However, now you told me this, I looked in
 > > *Messages* and I saw the message there. So it seems to work.
 > >
 > > Thanks for updating me. You are never too old to learn something new.
 > 
 > Well, I would not want to rule out any blunder of that kind sitting
 > around for 10 years or so.  But chances are that somebody might have
 > caught it at some time.  Don't even remember who did the original
 > docTeX-mode (or made it useful), probably Ralf.  It's quirky but pretty
 > useful.

I was tricked into thinking this, because I did C-h m in a dtx buffer, and then 
clicked on doctex-mode.el there (docTeX/FPS mode defined in ‘tex-mode.el’) and 
came in the standard TeX mode to my surprise. I just overlooked the :override 
advice: ‘TeX-doctex-mode’.

But maybe you can answer another question.
I want newline in a dtx buffer to automatically insert the % at the beginning 
of the line. You have to set TeX-newline-function to an appropriate value. I 
thought LaTeX-newline would be a good value, but that is not interactive. So I 
ended up with:
(setq TeX-newline-function #'(lambda () (interactive) (LaTeX-newline)))

Is there a better way? Or would I rather request LaTeX-newline to be made 
interactive?

With kind regards,
-- 
Piet van Oostrum <address@hidden>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]






reply via email to

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