GNU bug report logs - #14395
24.3; [PATCH] new feature smie-highlight-matching-block

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Tue, 14 May 2013 02:51:03 UTC

Severity: wishlist

Tags: patch

Found in version 24.3

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 14395 <at> debbugs.gnu.org
Subject: bug#14395: 24.3; [PATCH] new feature smie-highlight-matching-block
Date: Thu, 16 May 2013 13:51:12 -0400
>> I think the `remove-hook' should be done within the body of the
>> smie-highlight-matching-block-mode minor mode rather than here.
>> In here, you just need to wrap the add-hook within a test of
>> smie-highlight-matching-block-mode.
> But the post insert hook is buffer-local.

I know, but removing it where you remove it has mostly no effect (it's
normally run from a major-mode body, so all the vars have been set
back to their global value).

> Seems too much trouble to find all of them and remove-hook.

That's fine.  But doing it where you currently do it is a waste.

>> BTW.  Is there a non-SMIE version of "highlight-matching-block-mode",
>> which does it for parentheses?  If yes, maybe
>> smie-highlight-matching-block-mode should integrate into it.
> I am not sure there is.

Doesn't show-paren-mode do that?

>> One more thought, maybe you were right that futzing around with
>> add/remove-hook is too complicated and it's easier to check a variable.
>> But then maybe smie-highlight-matching-block-mode should set
>> blink-matching-paren to nil (which brings us back to whether there's
>> a global highlight-matching-block-mode working not just for modes using
>> SMIE).
> Maybe checking smie-highlight-matching-block-mode in
> smie-blink-matching-open is the better solution because
> post-self-insert-hook is buffer-local.

OK.
BTW, feel free to commit your current code in the mean time.


        Stefan




This bug report was last modified 12 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.