From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Simple way to make conditional key bindings. Date: 28 Aug 2002 00:58:30 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xsn0zgb8p.fsf@kfs2.cua.dk> References: <3D49FF140074EFAE@mel-rta7.wanadoo.fr> <5xadnd3eck.fsf@kfs2.cua.dk> <200208231722.g7NHM0M02096@rum.cs.yale.edu> <5xptw6wm2v.fsf@kfs2.cua.dk> <200208261547.g7QFlpA24835@rum.cs.yale.edu> <20020826193301.GA7248@gnu.org> <200208271905.g7RJ5hj13019@wijiji.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1030485578 32593 127.0.0.1 (27 Aug 2002 21:59:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 27 Aug 2002 21:59:38 +0000 (UTC) Cc: miles@gnu.org, monnier+gnu/emacs@rum.cs.yale.edu, storm@cua.dk, David.Ponce@wanadoo.fr, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17joN6-0008TW-00 for ; Tue, 27 Aug 2002 23:59:36 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17josa-0007uY-00 for ; Wed, 28 Aug 2002 00:32:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17joOM-00011j-00; Tue, 27 Aug 2002 18:00:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17joLi-0000wD-00 for emacs-devel@gnu.org; Tue, 27 Aug 2002 17:58:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17joLg-0000vv-00 for emacs-devel@gnu.org; Tue, 27 Aug 2002 17:58:09 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17joLg-0000vp-00; Tue, 27 Aug 2002 17:58:08 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 2DEE97C017; Tue, 27 Aug 2002 21:58:06 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: <200208271905.g7RJ5hj13019@wijiji.santafe.edu> Original-Lines: 20 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6999 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6999 Richard Stallman writes: > > I don't think that's right. I don't believe that table wants to override > > C-y sometimes: instead it wants to override `yank' sometimes. > > So what you want to do is to create `yank-careful' and then use > > either the `remap' thingy or substitute-key-definition or something > > like that. > > I wonder if it is possible for the text property keymap > to remap yank to my-yank, and have this affect bindings > of yank that come from the global map or buffer local map. > Does this work? It should work. Remapping works by taking the result of the normal key lookup, say `yank' for C-y and perform a new lookup (in the exact same keymaps) for the vector [remap yank]. But it will not (and cannot) check the keymap property of the text _to_be_yanked_.