[Top][All Lists]

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

Re: [Bug-AUCTeX] 11.83; Paren matching in AUCTeX

From: Shreevatsa R
Subject: Re: [Bug-AUCTeX] 11.83; Paren matching in AUCTeX
Date: Sun, 25 Feb 2007 07:28:15 +0530
User-agent: Mutt/1.5.13 (2006-08-11)

Quoting Ralf Angeli who at 2007-02-24 15:29:46+0100 (Sat) wrote
> * Shreevatsa R. (2007-02-23) writes:
> > There is a minor bug that is somewhat annoying...
> >
> > When using show-paren-mode, \[ and \] aren't matched. Similarly for \{
> > and \} and for \( and \). These, especially the first one, occur
> > somewhat frequently, so could this be fixed?
> In my opinion this is a deficiency of Show Paren mode and `scan_lists'
> which I addressed about 1.5 years ago on emacs-pretest-bug, see
> <URL:http://thread.gmane.org/87fyqz5fim.fsf%40neutrino.iwi.uni-sb.de>.
> So this has to be fixed in Emacs proper rather than in AUCTeX.

I looked at that thread, and as I understand it, the issue is:

* latex-mode defines \( and \) (and the others) as escaped, so
according to the syntax table of latex-mode, they are simply quoted
characters and don't correspond to each other.

* scan_lists (used by show-paren-mode, forward-sexp, etc.) regards
them as start/end of sexps despite the fact that they are escaped and
ought to have no syntactic meaning.

So it is a bug, in some sense, with scan_lists, that it is trying to
match them, as you say.

But from the LaTeX point of view, I think \( and \) and \[ and \],
aren't just escaped characters (maybe \{ and \} are). They have a role
in the syntax and if they don't match, LaTeX will complain... so it
useful and desirable to have sexp- and paren matching work on them. Is
it possible to redefine them appropriately, or does "\" have to escape
its next character universally or not at all?

This will not entirely solve the problem -- the bug with scan_lists
will still cause show-paren-mode to crib on \{ and \} -- but I think
it would be the right thing to do, if possible.


Shreevatsa R

reply via email to

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