bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] 11.86; LaTeX-current-environment related bug


From: Ralf Angeli
Subject: Re: [Bug-AUCTeX] 11.86; LaTeX-current-environment related bug
Date: Sat, 25 May 2013 11:17:39 +0200

* Mosè Giordano (2013-05-24) writes:

> Hi David,
>
> 2013/5/24 David Kastrup <address@hidden>:
>> 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



reply via email to

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