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: position on changing defaults? Date: Sat, 08 Mar 2008 19:07:41 +0100 Message-ID: <87bq5p3x8y.fsf@kfs-lx.rd.rdm> 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 1204999680 26242 80.91.229.12 (8 Mar 2008 18:08:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 18:08:00 +0000 (UTC) Cc: Juri Linkov , Chong Yidong , emacs-devel@gnu.org, Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 19:08:26 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 1JY3T6-0002vl-3K for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 19:08:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY3SY-0003RE-75 for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 13:07:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY3SU-0003Qv-42 for emacs-devel@gnu.org; Sat, 08 Mar 2008 13:07:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY3SS-0003Pk-JN for emacs-devel@gnu.org; Sat, 08 Mar 2008 13:07:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY3SS-0003Pd-Ce for emacs-devel@gnu.org; Sat, 08 Mar 2008 13:07:44 -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 1JY3SR-0001Bk-PL for emacs-devel@gnu.org; Sat, 08 Mar 2008 13:07:44 -0500 Original-Received: (qmail 95112 invoked from network); 8 Mar 2008 18:07:42 -0000 Original-Received: from unknown (HELO kfs-lx.rd.rdm.cua.dk) (213.83.150.21) by 0 with SMTP; 8 Mar 2008 18:07:42 -0000 In-Reply-To: (Stefan Monnier's message of "Thu\, 06 Mar 2008 11\:46\:58 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.91 (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:91741 Archived-At: Stefan Monnier writes: > 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. The argument against using pre-command-hook and post-command-hook is efficiency - the above seems a lot less efficient (I suppose you have to run all such lisp functions until you find one which returns true) - which also means that the sequence of key bindings in the keymaps start to matter... IMO, this interface is even worse that using the current hooks! -- Kim F. Storm http://www.cua.dk