[Top][All Lists]

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

Re: show-paren-mode indicates mismatch for escaped parentheses

From: Ralf Angeli
Subject: Re: show-paren-mode indicates mismatch for escaped parentheses
Date: Thu, 27 Oct 2005 17:47:48 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

* Juri Linkov (2005-10-27) writes:

>> To me it looks like the syntax table is fine, but `forward-sexp'
>> (i.e. `scan_lists') is disregarding it.
> How do you think `scan_lists' should treat a character quote?
> I think that when point is after it, then `scan_lists' should work
> as if point was before it, and to skip it and the following character
> as characters without their normal syntactic meaning.

Yes, this sounds reasonable.

> It seems after this change your patch for paren.el may be needed too,
> because `scan_lists' still will not find a matching paren when it will
> skip it without errors.


> The current situation with escape characters is still not clear for me.
> I don't understand why `scan_lists' can't match escaped parens in strings
> in emacs-lisp mode?  In strings "(" and "\(" have exactly the same meaning.
> So why to not treat them equally?
> There are many escaped opening parens in strings in source files
> (because parens in column zero should be escaped), but `scan_lists'
> fails on them.  Treating "\(" as "(" inside strings would help list
> movement commands as well as show-paren-mode to work normally on them.

The involved commands would then have to look at the context of "\("
and the like and know how to treat such constructs in different
contexts.  This can get pretty complicated. (c:


reply via email to

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