[Top][All Lists]

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

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

From: Richard Stallman
Subject: Re: Customizing key bindings (was: Re: [CVS] f7, f8 bound..)
Date: Sun, 08 Sep 2002 08:54:33 -0400

It looks basically good now.

    (defvar custom-global-keymap (let ((map (make-sparse-keymap)))
                                   (set-keymap-parent map global-map)

It looks like that is no longer used for anything.  Is it obsolete?

    (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)

It would be better to generate a defvar plus whatever other stuff
you need.

          ;; remove all keys no longer in bindings
          (mapc (lambda (bind)
                  (unless (assoc (car bind) bindings)
                    (custom-remove-key sym (read-kbd-macro (car bind)))))

I think that comment doesn't match the code.  The code removes all the
bindings in the previous list of customizations.

reply via email to

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