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: Stefan Monnier
Subject: Re: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore
Date: Tue, 13 Nov 2007 10:20:25 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> Since I have not touched CUA mode in CVS for a long time, something
> must have changed which breaks CUA mode in -nw mode.

> CUA normally works by looking for a shift modifier on the event,
> but it has special code to handle a non-windowing system:

>    ((if window-system
>       (memq 'shift (event-modifiers
>                     (aref (this-single-command-raw-keys) 0)))
>       (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.
>        (and (boundp 'local-function-key-map)
>           local-function-key-map
>           (let ((ev (lookup-key local-function-key-map
>                                 (this-single-command-raw-keys))))
>             (and (vector ev)
>                  (symbolp (setq ev (aref ev 0)))
>                  (string-match "S-" (symbol-name ev)))))))


> I can see that the multi-tty merge changed my original code to use
> local-function-key-map instead of function-key-map.

> IIRC, Stefan has since added input-decode-map to handle escape
> sequence decoding - so I guess the code need to look into that
> instead of OR in addition to local-function-key-map.

Oh, indeed, sorry for not catching this.  It should use input-decode-map
rather than local-function-key-map.  It may be even better to *also*
check local-function-key-map (after input-decode-map), but it shouldn't
be necessary.

This said, I'm not quite sure I understand enough of the above code:
why does it need to behave differently depending on window-system?


        Stefan




reply via email to

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