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: Stefan Monnier
Subject: Re: Attach a map to another
Date: Sat, 19 Feb 2022 14:24:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> 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




reply via email to

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