[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: position on changing defaults?
From:
Richard Stallman
Subject:
Re: position on changing defaults?
Date:
2008年3月06日 22:38:56 -0500
Unfortunately, I see no way of implementing this in simple.el without
using pre-command-hook and post-command-hook. It seems this can be
implemented only in C in the function that reads characters.
Maybe I can see a way to do it using nicer underlying mechanisms.
I am not entirely sure what the feature does; what does it need
these hooks for?
Miles wrote:
How about adding a new type of binding, a "modifier binding", which
could serve to implement CUA movement, and replace the current automatic
S-foo => foo remapping.
I do not understand -- what would this "modifier binding" mean,
and how would you use it for this?
Basically, these would be bindings that represent event-modifiers only.
If normal key lookup fails, the keymapping mechanism would then look up
and invoke the modifier binding corresponding to the modifiers on the
key, and invoke it instead; the invoked function could then, if it
wished (e.g. for CUA), set some variables or frob some state and
re-invoke the event with the modifiers removed.
I am still not sure I understand. If it means a kind of default
binding for all Shift keys that have no individual binding,
why is that better than binding the four shift-arrow keys
in the global map?
In general, I agree with the idea of exposing the translation of unbound
event-modified keys to Lisp functions that can process untranslated keys.
Maybe it would be possible to implement the following interface to define
such bindings?
(define-key global-map [(shift untranslated)]
(lambda ()
(interactive)
(when (and transient-mark-mode (not mark-active))
(push-mark-command nil nil))))
What does (shift untranslated) mean, and what would it do? And how
does it relate to this feature?
- Re: position on changing defaults?, (continued)
- Re: position on changing defaults? , Kim F. Storm, 2008年03月08日
- Re: position on changing defaults? , Stefan Monnier, 2008年03月08日
- Re: position on changing defaults? , Richard Stallman, 2008年03月09日
- Re: position on changing defaults? , Stefan Monnier, 2008年03月09日
- Re: position on changing defaults? , Kim F. Storm, 2008年03月09日
- Re: position on changing defaults? , Lennart Borgman (gmail), 2008年03月09日
- Re: position on changing defaults? , Richard Stallman, 2008年03月11日
- Re: position on changing defaults? , Kim F. Storm, 2008年03月11日
- Re: position on changing defaults? , Lennart Borgman (gmail), 2008年03月11日
- Re: position on changing defaults? , Richard Stallman, 2008年03月09日
- Re: position on changing defaults?,
Richard Stallman <=
- Re: position on changing defaults? , Kim F. Storm, 2008年03月05日
- Re: position on changing defaults? , Miles Bader, 2008年03月05日
- Re: position on changing defaults? , Lennart Borgman (gmail), 2008年03月05日
- Re: position on changing defaults? , Bastien, 2008年03月05日
- Re: position on changing defaults? , Stefan Monnier, 2008年03月06日
- Re: position on changing defaults? , Richard Stallman, 2008年03月08日
- Re: position on changing defaults? , Kim F. Storm, 2008年03月08日
- Re: position on changing defaults? , Richard Stallman, 2008年03月09日
- Re: position on changing defaults? , Kim F. Storm, 2008年03月09日
- CUA mode's C-RET binding [was: position on changing defaults?] , Drew Adams, 2008年03月09日