From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Simple way to make conditional key bindings. Date: Tue, 27 Aug 2002 13:05:43 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208271905.g7RJ5hj13019@wijiji.santafe.edu> 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> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1030475645 8391 127.0.0.1 (27 Aug 2002 19:14:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 27 Aug 2002 19:14:05 +0000 (UTC) Cc: 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 17jlmt-0002B6-00 for ; Tue, 27 Aug 2002 21:14:03 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17jmIK-0003pj-00 for ; Tue, 27 Aug 2002 21:46:32 +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 17jloE-0007nC-00; Tue, 27 Aug 2002 15:15:26 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17jlfB-0005f5-00 for emacs-devel@gnu.org; Tue, 27 Aug 2002 15:06:05 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17jlf0-0005aI-00 for emacs-devel@gnu.org; Tue, 27 Aug 2002 15:05:59 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17jler-0005XY-00; Tue, 27 Aug 2002 15:05:46 -0400 Original-Received: from wijiji.santafe.edu (wijiji [192.12.12.5]) by pele.santafe.edu (8.11.6+Sun/8.11.6) with ESMTP id g7RJ6A501883; Tue, 27 Aug 2002 13:06:10 -0600 (MDT) Original-Received: (from rms@localhost) by wijiji.santafe.edu (8.11.6+Sun/8.9.3) id g7RJ5hj13019; Tue, 27 Aug 2002 13:05:43 -0600 (MDT) X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@wijiji using -f Original-To: miles@gnu.org In-Reply-To: <20020826193301.GA7248@gnu.org> (message from Miles Bader on Mon, 26 Aug 2002 15:33:01 -0400) 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:6996 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6996 > 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? Much better is some system like fill-paragraph uses where the generic binding looks for `fill-parapgraph-function' to do the work, which modes can override. It is very useful to set up these hooks in specific places where we see we need them. However, we can't expect to provide these hooks for all the situations where someone wants to override a certain command for certain text.