emacs-devel
[Top][All Lists]
Advanced

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

Re: use-package.el -> Emacs core


From: John Wiegley
Subject: Re: use-package.el -> Emacs core
Date: Mon, 09 Nov 2015 22:07:16 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

>>>>> Kaushal Modi <address@hidden> writes:

> For define-key, we have 
> (define-key MAP KEY-VECTOR COMMAND)
> whereas we have 
> (bind-key KEY-STRING COMMAND MAP)

Actually, it's:

    (bind-key KEY-STRING COMMAND [MAP])

Which is very close to:

    (global-set-key KEY-STRING COMMAND)

`define-key' is more familiar to developers, but I don't think it's what most
users use in their init.el when they want to bind keys.

I could see adding an optional map argument to `global-set-key', although one
of the nice things about `bind-key' is that it sets up the necessary data to
allow `describe-personal-keybindings' to work.

And then there is `bind-key*', for truly global bindings that override minor
modes; and `bind-keys', for binding many keys at once, potentially into
multiple keymaps. So there might be a good reason to introduce a new layer
with this module, specifically intended for user customization in init.el
files.

John



reply via email to

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