From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore Date: Tue, 13 Nov 2007 10:20:25 -0500 Message-ID: References: <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 1194967277 18314 80.91.229.12 (13 Nov 2007 15:21:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Nov 2007 15:21:17 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 13 16:21:21 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 1IrxZP-0003Tg-NU for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 16:20:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrxZB-0000wv-Kl for ged-emacs-devel@m.gmane.org; Tue, 13 Nov 2007 10:20:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IrxZ2-0000w3-TY for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:20:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IrxZ1-0000vU-Cb for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:20:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IrxZ1-0000vR-1e for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:20:31 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IrxZ0-0004Fx-KQ for emacs-devel@gnu.org; Tue, 13 Nov 2007 10:20:30 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 2A6D32CF6DB; Tue, 13 Nov 2007 10:20:30 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id EEACB3FE0; Tue, 13 Nov 2007 10:20:25 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id D2E066CAA5; Tue, 13 Nov 2007 10:20:25 -0500 (EST) In-Reply-To: <87fxzab4if.fsf@kfs-lx.testafd.dk> (Kim F. Storm's message of "Tue, 13 Nov 2007 15:32:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:83127 Archived-At: > 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