[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Migration from define-key to bind-key with prefix-command
From: |
Karl Voit |
Subject: |
Re: Migration from define-key to bind-key with prefix-command |
Date: |
Tue, 10 Nov 2015 13:54:57 +0100 |
User-agent: |
slrn/pre1.0.0-18 (Linux) |
* Alex Kost <alezost@gmail.com> wrote:
> Karl Voit (2015-11-09 15:55 +0300) wrote:
>
>> How can I define "define-key" commands with a global prefix-command to
>> bind-key(s) syntax?
>
> Do you mean you want to use 'bind-key' package from
> <https://github.com/jwiegley/use-package/>?
Yes. However, I installed it from (M)Elpa directly.
> If so, you can use something like this:
>
> (bind-keys
> :prefix-map my-map
> :prefix-docstring "My favourite map"
> :prefix "C-c ,"
> ("-" . text-scale-decrease)
> ("+" . text-scale-increase))
>
> You are not forced to use a single spot. You can add keys to your map
> later:
>
> (bind-keys
> :map my-map
> ("f" . forward-char)
> ("b" . backward-char))
>
> or:
>
> (bind-key "RET" 'hanoi my-map)
Great!
My first attempts did overwrite each other but your examples made
everything clear to me. I was able to migrate my config to bind-key
thanks to you.
Greetings from Graz/Austria!
--
All in all, one of the most disturbing things today is the definitive
fact that the NSA, GCHQ, and many more government organizations are
massively terrorizing the freedom of us and the next generations.
http://Karl-Voit.at