emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 06 Mar 2008 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]