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: Tue, 11 Mar 2008 05:25:27 -0400

    > Binding some set of shifted keys to a command that says "run the
    > equivalent non-shifted character but do this other special thing"
    > seems better, because you could override that for individual shifted
    > keys if you wish.

    The problem is that running something based on the key - rather
    than on the command bound to that key is a bad road to take.

I am having trouble understanding that sentence, but it leads me to
suspect we are miscommunicating.  What I proposed is a command that we
would bind certain shifted keys to.  This command would look up the
binding of the corresponding non-shifted key and call it.
I think that is _less_ "based on the key" than your proposal.

              if (!NILP (Vshifted_key_hook) && key_shifted_p
                 && !NILP (Vthis_command)
                 && SYMBOLP (Vthis_command)
                 && !NILP (Fget (Vthis_command, Qshift))
                 && !NILP (Vrun_hooks))
                safe_run_hooks (Qshifted_key_hook);

This is not horrible, since rebinding the shift key to some other
unrelated command will still work.

But my solution has the virtue of being less magic.
My solution puts it entirely under the control of the
key binding of the shifted key, instead of a magic property
of shifted keys that causes them to behave differently with
the same binding.




reply via email to

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