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: Re: [Dan Nicolaescu] S-arrow_keys not working in cua-selection-mode anymore Date: Thu, 15 Nov 2007 13:52:36 +0100 Message-ID: <874pfnr7qj.fsf@kfs-lx.testafd.dk> References: <87fxzab4if.fsf@kfs-lx.testafd.dk> <87d4uduk2u.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 1195131194 28169 80.91.229.12 (15 Nov 2007 12:53:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 12:53:14 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 15 13:53:19 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 1IseDe-00018j-ET for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 13:53:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IseDR-0003NP-Pb for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 07:53:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IseDO-0003MZ-4N for emacs-devel@gnu.org; Thu, 15 Nov 2007 07:53:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IseDL-0003LI-9I for emacs-devel@gnu.org; Thu, 15 Nov 2007 07:53:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IseDL-0003LB-0T for emacs-devel@gnu.org; Thu, 15 Nov 2007 07:52:59 -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 1IseDK-0006od-Ie for emacs-devel@gnu.org; Thu, 15 Nov 2007 07:52:58 -0500 Original-Received: (qmail 51541 invoked from network); 15 Nov 2007 12:52:46 -0000 Original-Received: from unknown (HELO kfs-lx.testafd.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 15 Nov 2007 12:52:46 -0000 In-Reply-To: (Stefan Monnier's message of "Wed\, 14 Nov 2007 10\:14\:07 -0500") 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:83263 Archived-At: Stefan Monnier 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 http://www.cua.dk