From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: 14395@debbugs.gnu.org
Subject: bug#14395: 24.3; [PATCH] new feature smie-highlight-matching-block
Date: Thu, 16 May 2013 13:51:12 -0400 [thread overview]
Message-ID: <jwvhai2ddh2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m1zjvu9af4.fsf@gmail.com> (Leo Liu's message of "Fri, 17 May 2013 00:06:23 +0800")
>> 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
next prev parent reply other threads:[~2013-05-16 17:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 2:49 bug#14395: 24.3; [PATCH] new feature smie-highlight-matching-block Leo Liu
2013-05-14 16:02 ` Stefan Monnier
2013-05-15 7:13 ` Leo Liu
2013-05-16 2:31 ` Stefan Monnier
2013-05-16 3:27 ` Leo Liu
2013-05-16 13:24 ` Stefan Monnier
2013-05-16 16:06 ` Leo Liu
2013-05-16 17:51 ` Stefan Monnier [this message]
2013-05-16 23:09 ` Leo Liu
2013-05-17 0:40 ` Stefan Monnier
2013-05-17 1:30 ` Leo Liu
2013-05-22 18:50 ` Stefan Monnier
2013-05-16 4:45 ` Glenn Morris
2013-05-16 5:33 ` Leo Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvhai2ddh2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=14395@debbugs.gnu.org \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).