[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eval keymapp in a macros
From: |
Yuri Khan |
Subject: |
Re: Eval keymapp in a macros |
Date: |
Wed, 4 Aug 2021 11:54:02 +0700 |
On Wed, 4 Aug 2021 at 04:20, Arthur Miller <arthur.miller@live.com> wrote:
> Here is example from my init file (with conses):
>
> (with-key-map global
> ;; Window-buffer operations
> ("C-<insert>" . term-toggle)
> ("<insert>" . term-toggle-eshell)
> ([f9] . ispell-word)
> ([S-f10] . next-buffer)
> ([f10] . previous-buffer)
> ([f12] . kill-buffer-but-not-some)
> ([M-f12] . kill-buffer-other-window)
> ([C-M-f12] . only-current-buffer))
Two observations from the side:
* “with-*” naming is usually used for context manager macros. That is,
a macro initializes some resource or performs some temporary changes,
then executes the body, then does any necessary cleanup. You don’t
have any of that here.
* If you sacrifice a quote and a pair of braces, you can have your
typing saving as a simple function:
(my-define-keys global-map
'(("C-<insert>" . term-toggle)
("<insert>" . term-toggle-eshell)
…))
- Eval keymapp in a macros, Arthur Miller, 2021/08/02
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/02
- RE: [External] : Re: Eval keymapp in a macros, Drew Adams, 2021/08/02
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/03
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/03
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/04
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/04
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/05
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/05
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/12
- Re: Eval keymapp in a macros,
Yuri Khan <=
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/04
- Re: Eval keymapp in a macros, Stefan Monnier, 2021/08/04
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/05
- Re: Eval keymapp in a macros, Stefan Monnier, 2021/08/05
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/05
- Re: Eval keymapp in a macros, Stefan Monnier, 2021/08/05
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/06
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/12
- Re: Eval keymapp in a macros, Michael Heerdegen, 2021/08/04
- Re: Eval keymapp in a macros, Arthur Miller, 2021/08/05