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: Juri Linkov
Subject: Re: customizing key definitions with Customize
Date: Tue, 13 May 2008 03:03:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu)

>> 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.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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