unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14395@debbugs.gnu.org
Subject: bug#14395: 24.3; [PATCH] new feature smie-highlight-matching-block
Date: Fri, 17 May 2013 00:06:23 +0800	[thread overview]
Message-ID: <m1zjvu9af4.fsf@gmail.com> (raw)
In-Reply-To: <jwvli7fdq55.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 16 May 2013 09:24:08 -0400")

On 2013-05-16 21:24 +0800, Stefan Monnier wrote:
> 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. Seems too much trouble to find
all of them and remove-hook.

> 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.

> 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.

Leo





  reply	other threads:[~2013-05-16 16:06 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 [this message]
2013-05-16 17:51             ` Stefan Monnier
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=m1zjvu9af4.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=14395@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).