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: position on changing defaults? Date: Thu, 06 Mar 2008 11:46:58 -0500 Message-ID: References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <87hcfkdhqk.fsf@stupidchicken.com> <87d4q8sq9c.fsf@jurta.org> <8763w0n393.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204822094 26191 80.91.229.12 (6 Mar 2008 16:48:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Mar 2008 16:48:14 +0000 (UTC) Cc: Juri Linkov , Chong Yidong , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 06 17:48:41 2008 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 1JXJGJ-00027k-0B for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 17:48:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXJFk-0004uF-GU for ged-emacs-devel@m.gmane.org; Thu, 06 Mar 2008 11:47:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JXJFQ-0004hK-03 for emacs-devel@gnu.org; Thu, 06 Mar 2008 11:47:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JXJFO-0004gR-9S for emacs-devel@gnu.org; Thu, 06 Mar 2008 11:47:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JXJFO-0004gM-6O for emacs-devel@gnu.org; Thu, 06 Mar 2008 11:47:10 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JXJFH-0004DI-NG; Thu, 06 Mar 2008 11:47:04 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAJeuz0fO+LKX/2dsb2JhbACsRIEH X-IronPort-AV: E=Sophos;i="4.25,456,1199682000"; d="scan'208";a="15662458" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 06 Mar 2008 11:46:59 -0500 Original-Received: from pastel.home ([206.248.178.151]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id MTA15459; Thu, 06 Mar 2008 11:46:59 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CB697816B; Thu, 6 Mar 2008 11:46:58 -0500 (EST) In-Reply-To: <8763w0n393.fsf@catnip.gol.com> (Miles Bader's message of "Thu, 06 Mar 2008 08:46:16 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:91507 Archived-At: > How about adding a new type of binding, a "modifier binding", which > could serve to implement CUA movement, and replace the current automatic > S-foo => foo remapping. I'm not sure I understand what you're proposing. One thing we can do right now is: (define-key function-key-map [S-up] (lambda (prompt) (setq foo-shited t) [up])) and one thing I'd like to do is to replace the C-level mapping of S-foo to foo by some entry in function-key-map. This requires extending the function-key-map mechanism, tho. I don't know what it would look like, but just to make it more concrete, here's one possible way: (define-key function-key-map [S-*] (lambda (prompt key) (vector (remove-shift key)))) Obviously, this can't work as is. Maybe an even better generalization would be (define-key function-key-map [is-shifted-p] (lambda (prompt key) (vector (remove-shift key)))) (define-key function-key-map [is-mouse-4-p] (lambda (prompt key) (vector (combine-modifiers (modifiers key) 'mwheel-up))) where `is-shifted-p' and `is-mouse-4-p' are Lisp functions. Stefan