* Mosè Giordano (2013-05-24) writes: > Hi David, > > 2013/5/24 David Kastrup <d...@gnu.org>: >> Huh? fontification is _lazy_ by default. Off-screen areas are not >> fontified unless you page over them.
Is this a problem with the current code? > How about not checking comments in `LaTeX-current-environment'? I.e., > something like > --8<---------------cut here---------------start------------->8--- > (setq arg (if arg (if (< arg 1) 1 arg) 1)) > (save-excursion > (while (and (/= arg 0) > (re-search-backward > "\\\\\\(begin\\|end\\) *{ *\\([A-Za-z*]+\\) *}" nil t)) > (setq arg (if (string= (match-string 1) "end") (1+ arg) (1- arg))))) > (if (/= arg 0) > "document" > (match-string-no-properties 2)) > --8<---------------cut here---------------end--------------->8--- > This has definitely side effects, but also make it possible to put a > dummy \begin{} or \end{} inside comment to help AUCTeX guess current > environment, much like (info "(auctex) Known problems"). I'd appreciate it if you didn't do such a change. I've tried hard to keep stuff in the commented and non-commented parts of a LaTeX file separate. If those get mixed up, you cannot put anything you want anymore into comments and may get surprising behavior when inserting environments. -- Ralf _______________________________________________ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex