unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: emacs-devel@gnu.org
Cc: Dan Nicolaescu <dann@ics.uci.edu>
Subject: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore
Date: Tue, 13 Nov 2007 15:32:08 +0100	[thread overview]
Message-ID: <87fxzab4if.fsf@kfs-lx.testafd.dk> (raw)


Dan Nicolaescu has reported the following bug.

> In emacs CVS now S-{arrow key} does not work anymore in
> cua-selection-mode when using emacs -Q -nw in an xterm. 
> Not sure when this stopped working, I have a 2 months old version that
> still works.
>  
> The same thing works in pc-selection-mode, so the keys do send the
> right escape sequences.

  
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.

Since I haven't followed recent developments, I would appreciate
if someone could DTRT here.

Thanks!

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

             reply	other threads:[~2007-11-13 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-13 14:32 Kim F. Storm [this message]
2007-11-13 15:20 ` [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore Stefan Monnier
2007-11-14 11:45   ` Kim F. Storm
2007-11-14 15:14     ` Stefan Monnier
2007-11-15 12:52       ` Kim F. Storm
2007-11-15 16:36         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fxzab4if.fsf@kfs-lx.testafd.dk \
    --to=storm@cua.dk \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).