auctex
[Top][All Lists]
Advanced

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

[AUCTeX] automatic TeX-fold-paragraph after newline?


From: Joost Kremers
Subject: [AUCTeX] automatic TeX-fold-paragraph after newline?
Date: Wed, 15 Oct 2008 18:13:25 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

I just added the following code to my .emacs, so that hitting RET (or M-RET
in a list environment) automatically runs TeX-fold-paragraph on the text
I've just typed:

(defadvice TeX-newline (before TeX-fold activate)
  (interactive)
  (TeX-fold-paragraph))

(defadvice LaTeX-insert-item (before TeX-fold activate)
  (interactive)
  (TeX-fold-paragraph))

I'm wondering, though: is there perhaps a better way to do this? I know I
can customise TeX-newline-function, but that doesn't work for M-RET.

If there isn't a better way, would it be something useful to add to AUCTeX?

TIA


-- 
Joost Kremers, PhD
University of Frankfurt
Institute for Cognitive Linguistics
Grüneburgplatz 1
60629 Frankfurt am Main, Germany




reply via email to

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