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: Drew Adams
Subject: RE: customizing key definitions with Customize
Date: Tue, 13 May 2008 22:23:09 -0700

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

That was the idea behind using a user option for key definitions. Whether having
a separate user option is better or worse could be discussed.





reply via email to

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