* prefix key with its own map as binding?
@ 2007-03-25 20:55 Joost Kremers
0 siblings, 0 replies; only message in thread
From: Joost Kremers @ 2007-03-25 20:55 UTC (permalink / raw)
To: help-gnu-emacs
is there a "conventional" way of binding a prefix key to the very same
keymap it is in? basically thus:
(defvar some-mode-map (make-keymap))
(suppress-keymap some-mode-map)
(define-key some-mode-map "a" 'some-function)
(define-key some-mode-map "b" 'some-other-function)
(define-key some-mode-map "c" 'yet-some-other-function)
(define-key some-mode-map ...)
(define-key some-mode-map ":" 'some-mode-map)
(fset 'some-mode-map some-mode-map)
the idea is that every function that is bound to a key in some-mode-map can
be called either by pressing its command key, or by pressing `:' followed
by its command key. the function called can then use this-command-keys to
determine how it was called, and determine its behaviour accordingly.
alternatively, if all this sounds like A Bad Idea(TM), is there another way
to get this (or similar) behaviour? (using a prefix argument is not really
an option, btw.)
TIA
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-25 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-25 20:55 prefix key with its own map as binding? Joost Kremers
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).