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: Mon, 09 Sep 2002 09:57:46 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8)

Richard Stallman <address@hidden> writes:

> It looks basically good now.
>
>     (defvar custom-global-keymap (let ((map (make-sparse-keymap)))
>                                  (set-keymap-parent map global-map)
>                                  map)
>
> It looks like that is no longer used for anything.  Is it obsolete?

Yes, totally.

>     (defmacro defkeymap (symbol map doc &rest args)
>       "Define SYMBOL to be a keymap with value MAP.
>     DOC is the keymap documentation."
>       ;; It is better not to use backquote in this file,
>       ;; because that makes a bootstrapping problem
>       ;; if you need to recompile all the Lisp files using interpreted code.
>       (nconc (list 'custom-declare-keymap
>                  (list 'quote symbol)
>                  (list 'quote map)
>                  doc)
>            args))
>
> It would be better to generate a defvar plus whatever other stuff
> you need.

I prefer doing most of the work in functions rather than macros,
because if we change defkeymap in Emacs version X+1, then packages
compiled by the user in Emacs version X will call the new function,
and thus continue to work.  I had a lot of such problems with
easymenu.el.

It seems likely that we may want to change 'custom-declare-keymap'
after getting experience from a release, so this is a real concern.




reply via email to

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