emacs-devel
[Top][All Lists]
Advanced

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

Re: customizing key definitions with Customize


From: Lennart Borgman (gmail)
Subject: Re: customizing key definitions with Customize
Date: Tue, 13 May 2008 02:40:03 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Juri Linkov wrote:
Using Customize to rebind keys would be a good feature to add;
but in order to make this fit in well with Emacs, it should
store the bindings in keymaps.  For instance, if you customize
the bindings of Lisp mode, it should do that by altering
the bindings in lisp-mode-map.
Not sure what you mean. The code I sent does let users change bindings in the
keymap. If such an option were provided for Lisp mode, users could use it to
change `lisp-mode-map' bindings. However, it is true that if a binding is
changed in some other way, it is not then reflected in the user option. That
could be fixed.

Another alternative is to make keybindings first-class entities
for Customize like faces with their `defface' definition.
So customized and saved settings in a customization file
would be like:

(custom-set-keybindings
  ;; custom-set-keybindings was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(emacs-lisp-mode-map (([tab] 'lisp-indent-or-complete) ...))
 ...)

that will override the default bindings in the corresponding keymaps.

Looks like a good step towards customize-sparse-keymap.




reply via email to

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