* command chains feature request
@ 2012-10-29 15:23 Le Wang
0 siblings, 0 replies; 2+ messages in thread
From: Le Wang @ 2012-10-29 15:23 UTC (permalink / raw)
To: GNU Emacs List
Hi all,
Here is an example scenario: I have multiple minor-modes that bind to
space key.
In xxx if I'm at the beginning of a comment, then it indents the whole
comment. In mode yyy if I'm at the beginning of paired delimiters, it
adds padding spaces to the end as well. The exact details of these
modes aren't crucial.
Now xxx and yyy authors are smarty pantsesses. They decided to write
their commands such that if the context doesn't require special
action, instead of inserting spaces, they'd just lookup the current
key-binding the the last input event (taking their minor-mode out of
consideration). In this way both modes share the space key very
happily.
However when I do "C-h k SPC", the help documentation does not show me
this current state of things. Instead it shows me the help for
whichever command currently has higher priority.
Autopair does some on the fly doc generation magic to say what the
fallback command is, but that's not ideal since the fallback could
have its own fallback.
Can Emacs have some features that make writing inter-operable commands
easier, as well as generating help that explains the chain of commands
in fallback order?
I'm sure this isn't the right forum for a feature request. But we can
discuss it here first.
--
Le
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: command chains feature request
[not found] <mailman.11925.1351524250.855.help-gnu-emacs@gnu.org>
@ 2012-10-31 14:58 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2012-10-31 14:58 UTC (permalink / raw)
To: help-gnu-emacs
> Here is an example scenario: I have multiple minor-modes that bind to
> space key.
Part of the motivation behind post-self-insert-hook is specifically to
solve this problem.
electric-pair-mode, electric-layout-mode, and electric-indent-mode are
examples of minor modes which can more-or-less happily share keys.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-31 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.11925.1351524250.855.help-gnu-emacs@gnu.org>
2012-10-31 14:58 ` command chains feature request Stefan Monnier
2012-10-29 15:23 Le Wang
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).