gnu-emacs-sources
[Top][All Lists]
Advanced

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

Re: mic-paren.el 3.10 available


From: Stefan Monnier
Subject: Re: mic-paren.el 3.10 available
Date: Thu, 17 Jan 2013 09:58:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> It seems the scan-sexps call in mic-paren-highlight fails to find the
> matching parenthesis which gives us the funny mismatch look.

Right.  The built-in blink-matching-open actually also bumps into
a problem, but just signals "Mismatched parenthesis", which is less
annoying but still incorrect.

>                    (condition-case ()
> -                      (setq opos (scan-sexps (point) mult))
> +                      (setq opos (let ((parse-sexp-ignore-comments nil))
> +                                   (scan-sexps (point) mult)))
>                      (error nil))))

But this leads to other bugs (try it with a comment like (* foo"bar *)
for example).

I think the only way to do it right begins by checking whether (1-
(point)) is within a comment.


        Stefan



reply via email to

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