auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: Use `C-q $' to force a dollar


From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Use `C-q $' to force a dollar
Date: Sat, 03 Dec 2005 11:58:49 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* David Kastrup (2005-12-03) writes:

> Ralf Angeli <address@hidden> writes:
>
>> * David Kastrup (2005-12-01) writes:
>>
>>> ( blablabla ]
>>>
>>> It just outputs "Mismatched parentheses" in the echo area, and that's
>>> it.  The character still gets inserted.
>>>
>>> What do you think?
>>
>> Would be fine with me.  Having a cursory look at changes in tex.el
>> this would probably be the same behavior AUCTeX exhibited before
>> June 1998 modulo the warning message, see `cvs diff -u -r5.161
>> -r5.162'.
>
> Would you trust your grasp of the situation enough to do the change?

I haven't looked more closely yet, but I think it shouldn't be a big
problem.

>> In addition it would be nice if show-paren-mode indicated matched
>> and mismatched math togglers.
>
> I am not sure whether we'd have suitable hooks into that mode.  Would
> this require advising functions?

Again, I haven't looked closely at this.  If I recall correctly,
paren.el works with characters having open or close parenthesis
syntax.  Our $ has paired delimiter syntax.  I'll have to check if it
makes sense to provide matching for that at all and if it does, how to
persuade paren.el to use it.  If it turns out sensible, it would
probably be better to aim at an upstream change of paren.el rather
than juggling with advised functions.

>> By the way, dollar matching as done by `TeX-insert-dollar' is a
>> little bit off kilter in cases like
>>
>> \begin{verbatim}
>> $ ls
>> \end{verbatim}
>> <-- insert $ here
>
> As long as the consequences are harmless (and beeping and doubling
> some other dollar don't count as that in my book), it would probably
> not be too important.

What I am yearning for are syntax properties that indicate start and
end of verbatim constructs and that could be set without having to use
font-lock.el.  These properties would probably be have to set for the
whole file at load time.  After that one could find and skip verbatim
constructs very fast with `previous-single-property-change' etc. and
long regexp searches for fixing the above problem would not be
necessary.  The same technique could probably be used to mark
environment starts and ends in general.

If I understood the discussions on emacs-devel (or was it
emacs-pretest-bug?) about font locking correctly Stephan Monnier
thinks about extending syntax.el to support stuff like that after
Emacs 22 will be released.

-- 
Ralf





reply via email to

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