From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore Date: Tue, 13 Nov 2007 15:32:08 +0100 Message-ID: <87fxzab4if.fsf@kfs-lx.testafd.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194964378 6987 80.91.229.12 (13 Nov 2007 14:32:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2007 14:32:58 +0000 (UTC) Cc: Dan Nicolaescu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 13 15:33:02 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Irwow-0001Ld-KW for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 15:32:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Irwok-00040I-C6 for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 09:32:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrwoQ-0003eY-UX for emacs-devel@gnu.org; Tue, 13 Nov 2007 09:32:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrwoP-0003dR-T7 for emacs-devel@gnu.org; Tue, 13 Nov 2007 09:32:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrwoP-0003dI-KV for emacs-devel@gnu.org; Tue, 13 Nov 2007 09:32:21 -0500 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IrwoO-0003q4-UI for emacs-devel@gnu.org; Tue, 13 Nov 2007 09:32:21 -0500 Original-Received: (qmail 98699 invoked from network); 13 Nov 2007 14:32:09 -0000 Original-Received: from unknown (HELO kfs-lx.testafd.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 13 Nov 2007 14:32:09 -0000 User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83123 Archived-At: 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 http://www.cua.dk