emacs-devel
[Top][All Lists]
Advanced

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

Re: Customizing key bindings (was: Re: [CVS] f7, f8 bound..)


From: Per Abrahamsen
Subject: Re: Customizing key bindings (was: Re: [CVS] f7, f8 bound..)
Date: Thu, 05 Sep 2002 20:35:34 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8)

Richard Stallman <address@hidden> writes:

>     How about allowing a more declarative form like
>
>       (defkeymap my-mode-map
>       '(([mouse-1] . foo)
>         (([mouse-2] "f" "e" "\C-m") . open-file))
>       "Keymap for My mode."
>       :group 'foo
>       :inherit his-mode-map)
>
> That is a clean interface, but the crucial question is, what would it
> expand into?  Would it just be a defvar for my-mode-map, or a
> defcustom for my-mode-map?  Or would it produce something else?  If
> so, what else?

It is just a variation of the code Alex already posted.  It creates a
variable my-mode-map whose value is a keymap with the specified
bindings, and which can be customized with customize-option.  The
variable belongs to the foo customize group, and the keymap inherits
from his-mode-map.






reply via email to

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