emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anym


From: Kim F. Storm
Subject: Re: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore
Date: Thu, 15 Nov 2007 13:52:36 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I'll do it.
>
Thanks.

>
> I understand the need for the tty version of the code, but I'm wondering
> why that branch can't be used equally well for the window-system case.
> I.e. I suggest the code below instead:
>
>     ((or
>       (memq 'shift (event-modifiers
>                    (aref (this-single-command-keys) 0)))
>       ;; See if raw escape sequence maps to a shifted event, e.g. S-up or 
> C-S-home.
>       (let ((ev (lookup-key input-decode-map
>                             (this-single-command-raw-keys))))
>         (if (vector ev)
>             (and (symbolp (setq ev (aref ev 0)))
>                  (string-match "S-" (symbol-name ev)))
>           (memq 'shift (event-modifiers
>                         (aref (this-single-command-raw-keys) 0))))))
>

It might work, yes, but the window system code is faster, simpler, and
has worked fine (at least in my experience).

So I don't see a reason to go through the "tricky -nw path" also on
window systems ... just to end up doing the same thing as before.

But perhaps there us some benefit of going through input-decode-map
also on window systems?

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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