From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: How to define a prefixed map for a minor mode?
Date: Sun, 07 Jun 2020 10:16:38 +0200 [thread overview]
Message-ID: <87bllvcmu1.fsf@web.de> (raw)
In-Reply-To: 87h7vncnn4.fsf@web.de
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))
Michael.
next prev parent reply other threads:[~2020-06-07 8:16 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 [this message]
2020-06-07 20:45 ` Marcin Borkowski
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bllvcmu1.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).