emacs-devel
[Top][All Lists]
Advanced

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

RE: ffap bindings suggestion


From: Drew Adams
Subject: RE: ffap bindings suggestion
Date: Sun, 12 Feb 2006 13:19:31 -0800

    >       In one of my libraries, I use a minor mode, and restore the
    >       original bindings when the mode is exited. I find that
    >       clean. However, the library currently just restores the vanilla
    >       Emacs (-q) bindings; it would of course be better to save the
    >       bindings at the time of entry into the mode, and restore those
    >       (original user bindings) when the mode is exited. I'm not
    >       referring here to a keymap that is local to the mode; in my
    >       case, the minor mode changes minibuffer key bindings. (Using a
    >       local keymap is obviously the way to go when appropriate.)

    BTW, why do you change the minibuffer-local-map rather than simply use
    a proper minor mode with minor-mode-map-alist?

Perhaps I don't understand `minor-mode-map-alist' well enough. I don't know
how to use it to create some bindings that will be used only in the
minibuffer (some only for particular kinds of completion etc.), and that
will be seen by built-in functions that work with the minibuffer.

I change the various `minibuffer-*-map's because I use built-in functions
such as `completing-read' that work with those maps (built-in functions
don't know about my minor mode). For instance, the C code defining
`completing-read' refers to `Vminibuffer_local_completion_map' (and so on)
explicitly.

It is only minibuffer maps that I need to change in this way. I do also have
a minor-mode map that I use for some bindings that are not limited to the
minibuffer.

Let me know if I'm missing a better way to do this.





reply via email to

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