From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Mapping of M-g should be goto-line Date: Fri, 26 Mar 2004 19:07:52 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040327000752.GC26429@fencepost> References: <20040326112721.7B8C.JMBARRANQUERO@wke.es> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080346826 24949 80.91.224.253 (27 Mar 2004 00:20:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 27 Mar 2004 00:20:26 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 27 01:20:20 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B71Yi-0007Lv-00 for ; Sat, 27 Mar 2004 01:20:20 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B71Yi-0000tG-00 for ; Sat, 27 Mar 2004 01:20:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B71SD-0001rh-6J for emacs-devel@quimby.gnus.org; Fri, 26 Mar 2004 19:13:37 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B71S3-0001rU-VA for emacs-devel@gnu.org; Fri, 26 Mar 2004 19:13:27 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B71RX-0001oG-4Z for emacs-devel@gnu.org; Fri, 26 Mar 2004 19:13:26 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B71RW-0001oA-OO for emacs-devel@gnu.org; Fri, 26 Mar 2004 19:12:54 -0500 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1B71Me-0001sb-P9; Fri, 26 Mar 2004 19:07:52 -0500 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20980 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20980 On Fri, Mar 26, 2004 at 09:25:49AM -0500, Stefan Monnier wrote: > It seems people don't understand what I really want to say, so here's > another take on it: > > 1 - let's create a new command > > (global-set-key "\C-c\C-c" 'done-editing-now-do-it) > > 2 - let's optimize it away: > > (global-set-key "\C-c\C-c" 'compile) > > Notice it's only an optimization that relies on the fact that the > binding can trivially be overridden by local maps and on the fact that > done-editing-now-do-it did not do anything more than call the > done-editing-now-do-it-function function. The intention is still that > major modes (or recursive-edit or minor-modes or whatever else shows up) > should rebind it to something more appropriate if applicable. I intensely dislike this sort of `ah modes can just rebind the key' way of avoiding a level of indirection, because often I use different global bindings that normal -- and in that case, with a variable used for configuring things, everything works great, but if modes `override by rebinding', then I end up having to have my own personal special cases for every single mode that wants to do this. A good example is `fill-paragraph-function': I _love_ this, because I use a non-standard binding for `fill-paragaraph'; in the bad-old-days, when many modes with paragraph-filling support would just rebind `M-q' (or whatever the standard binding for fill-paragraph is -- I can't remember!), it was a nightmare, but now that most instead just set fill-paragraph-function, I have no problems at all, everything works swimmingly. [I've always wished for a level of indirection _built into keymaps_ -- e.g. standard global bindings could be named, and then locally overridden by name in modes.] -Miles -- Freedom's just another word, for nothing left to lose --Janis Joplin