From: "Davis Herring" <herring@lanl.gov>
To: gebser@mousecar.com
Cc: emacs-bug <emacs-devel@gnu.org>
Subject: Re: Creating submenu
Date: Wed, 2 Dec 2009 10:49:42 -0800 (PST) [thread overview]
Message-ID: <35484.130.55.118.19.1259779782.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <4B166573.4030609@mousecar.com>
> ;Make ^C-cg a key prefix for chars menu
> (global-set-key [?\C-c ?g] ctl-x-map)
You're reusing the keymap that C-x is normally bound to, so now C-c g is
an alias for C-x in every respect. Don't do that! Make a new keymap:
(defvar chars-map (make-sparse-keymap)
"Keymap for inserting special characters.")
(global-set-key [?\C-c ?g] chars-map)
You can omit "sparse-" if you're planning to bind lots of ASCII characters
(like, say, C-c g a, C-c g 0, etc.).
> (fset 'list-all-chars [?\C-x ?8 f1])
You can do this more idomatically with
(defun list-all-chars ()
"Describe the C-x 8 keybindings."
(interactive)
(describe-bindings "\C-x8"))
(`describe-bindings' is what implements `f1' after a prefix key.) But
there might be a better way: one that used the binding of C-x 8 directly
so that it would work even if the user had moved that binding elsewhere.
I don't know what it would be, though.
Hope this helps,
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
next prev parent reply other threads:[~2009-12-02 18:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 13:02 Creating submenu ken
2009-12-02 18:49 ` Davis Herring [this message]
2009-12-03 2:03 ` ken
[not found] <mailman.11799.1259538618.2239.help-gnu-emacs@gnu.org>
2009-11-30 0:05 ` Joost Kremers
-- strict thread matches above, loose matches on Subject: below --
2009-11-29 23:50 ken
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=35484.130.55.118.19.1259779782.squirrel@webmail.lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
--cc=gebser@mousecar.com \
/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.