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

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

Re: Attach a map to another


From: Ergus
Subject: Re: Attach a map to another
Date: Sun, 20 Feb 2022 12:10:35 +0100

It is a pseudo code I wrote quickly :p... Adding a :global t may be enough?

On February 19, 2022 8:24:28 PM GMT+01:00, Stefan Monnier via Users list for 
the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>> We sadly don't yet have good functions for that, so you have to get
>> dirty and do it by hand, with something like:
>>
>>     (define-minor-mode my-mode
>>       (if my-mode
>>           (cl-pushnew my-mode-map (cdr isearch-mode-map))
>>         (delq my-mode-map isearch-mode-map)))
>
>BTW, this sample code is badly broken: the above `define-minor-mode`
>will create a buffer-local minor mode whereas the modification we apply
>to `isearch-mode-map` will be global :-(
>
>
>        Stefan
>
>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

reply via email to

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