From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: substitute-key-definition vs. define-key MAP [remap ...] Date: Sun, 25 Jul 2010 22:43:51 +0900 Message-ID: <8739v7u160.fsf@catnip.gol.com> References: <871vb517a6.fsf@mithlond.arda> <87aapiyhzo.fsf@uwakimon.sk.tsukuba.ac.jp> <87y6d1we4j.fsf@uwakimon.sk.tsukuba.ac.jp> <87aaphusuz.fsf@catnip.gol.com> <87tynpvtvz.fsf@uwakimon.sk.tsukuba.ac.jp> <87vd84tfeu.fsf@catnip.gol.com> <87ocdvx3r3.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280065452 26602 80.91.229.12 (25 Jul 2010 13:44:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Jul 2010 13:44:12 +0000 (UTC) Cc: Teemu Likonen , Stefan Monnier , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 25 15:44:11 2010 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.69) (envelope-from ) id 1Od1Ut-00025f-BD for ged-emacs-devel@m.gmane.org; Sun, 25 Jul 2010 15:44:07 +0200 Original-Received: from localhost ([127.0.0.1]:32823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Od1Us-00036m-Qd for ged-emacs-devel@m.gmane.org; Sun, 25 Jul 2010 09:44:06 -0400 Original-Received: from [140.186.70.92] (port=58515 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Od1Um-00034t-KL for emacs-devel@gnu.org; Sun, 25 Jul 2010 09:44:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Od1Ul-0006Q5-4f for emacs-devel@gnu.org; Sun, 25 Jul 2010 09:44:00 -0400 Original-Received: from smtp12.dentaku.gol.com ([203.216.5.74]:54728) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Od1Uk-0006Pk-Rs; Sun, 25 Jul 2010 09:43:59 -0400 Original-Received: from 218.33.232.67.eo.eaccess.ne.jp ([218.33.232.67] helo=catnip.gol.com) by smtp12.dentaku.gol.com with esmtpa (Dentaku) id 1Od1Ue-0007dy-3Q; Sun, 25 Jul 2010 22:43:52 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 61227DF92; Sun, 25 Jul 2010 22:43:51 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: <87ocdvx3r3.fsf@uwakimon.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Sun, 25 Jul 2010 19:19:44 +0900") Original-Lines: 24 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by eggs.gnu.org: GNU/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:127760 Archived-At: "Stephen J. Turnbull" writes: > > It's far better, because it follows the normal scoping rules of > > keymaps > > OK, but that's not what I understood from Stefan's description. He > said that remapping would affect *all* uses of the command as a > binding, requiring either invocation via M-x or renaming the command. It affects all uses _where the [remap ...] key-entry is visible (in the same way a normal binding is visible)_. So in my example, when caps-lock-mode is turned on, a small [remap] binding becomes visible via minor-mode-map-alist, and thus affects keystrokes in that buffer (until you turn off the minor-mode, which implicitly disables its keymap). [I have no idea what the implementation is like, but the above is the basic idea.] -Miles -- We are all lying in the gutter, but some of us are looking at the stars. -Oscar Wilde