[Top][All Lists]

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

Re: electric-pair-mode as a minor mode?

From: Tom Willemse
Subject: Re: electric-pair-mode as a minor mode?
Date: Fri, 27 Mar 2015 13:52:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I'd like to disable electric-pair-mode in certain buffers.
>> Probably the most important example is the minibuffer.
>> Incremental searching with eletric-pairing is frustrating as opposed to
>> being helpful as the search is "temporarily broken" as soon as the pair
>> is inserted.
> [ I'm curious to know more about those isearch and minibuffer cases
>   because I haven't bumped into them.  Not that it makes any difference
>   to the following.  ]
>> I made eletric-pair-mode nil/buffer-local in the hooks that I need,
>> but somehow I feel electric-pair-mode should be a regular minor mode.
> Hmm, electric-pair-mode *is* a regular minor mode.  Maybe you mean
> that it should be buffer-local because you'd only want to enable it in
> a few specific major modes?
> We could very well define an electric-pair-local-mode, like we did with
> electric-indent-local-mode.  In the mean time, you should be able to
> hack it with something like:

Not to be a nuisance, but I wrote a patch for that some time ago and I'm
still waiting on a response:

I've been using it since long before I sent it in and it's basically
just a copy of the `electric-indent-local-mode' code (comments and all).



reply via email to

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