From: Marcin Borkowski <mbork@mbork.pl>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to define a prefixed map for a minor mode?
Date: Sun, 07 Jun 2020 22:45:01 +0200 [thread overview]
Message-ID: <878sgymwqa.fsf@mbork.pl> (raw)
In-Reply-To: <87bllvcmu1.fsf@web.de>
On 2020-06-07, at 10:16, Michael Heerdegen <michael_heerdegen@web.de> wrote:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> > (easy-mmode-defmap ecat-mode-map
>> > `(((kbd "C-c .") . ecat-basic-map))
>> > "Keymap for `ecat-mode'.")
>>
>> I don't know much about this but passing an unevaluated `kbd' expression
>> doesn't look right to me.
>
> AFAIR I use to do this kind of thing like this:
>
> (define-minor-mode ecat-mode
> "Toggle Emacs CAT mode."
> :lighter " CAT"
> :keymap (let ((map (make-sparse-keymap)))
> (define-key map (kbd "C-c .") ecat-basic-map)
> map))
Thanks, that seems to make sense to me.
Still, I'd love to see the "canonical" way...
Best,
--
Marcin Borkowski
http://mbork.pl
next prev parent reply other threads:[~2020-06-07 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-07 6:50 How to define a prefixed map for a minor mode? Marcin Borkowski
2020-06-07 7:54 ` Jamie Beardslee
2020-06-07 20:45 ` Marcin Borkowski
2020-06-07 7:59 ` Michael Heerdegen
2020-06-07 8:16 ` Michael Heerdegen
2020-06-07 20:45 ` Marcin Borkowski [this message]
2020-06-08 11:23 ` Michael Heerdegen
2020-06-07 20:44 ` Marcin Borkowski
2020-06-07 10:18 ` Joost Kremers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sgymwqa.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.