From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: keymap in yank-excluded-properties Date: Fri, 23 Aug 2002 16:04:27 -0700 (PDT) Organization: Sony Electronics Inc. Sender: emacs-devel-admin@gnu.org Message-ID: <20020823.160427.60851399.Takaaki.Ota@am.sony.com> References: <20020823.152121.01367723.Takaaki.Ota@am.sony.com> <200208232229.g7NMTor08563@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1030143980 19446 127.0.0.1 (23 Aug 2002 23:06:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 Aug 2002 23:06:20 +0000 (UTC) Cc: miles@gnu.org, miles@lsi.nec.co.jp, 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 17iNVT-00053X-00 for ; Sat, 24 Aug 2002 01:06:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17iNz2-0008N5-00 for ; Sat, 24 Aug 2002 01:36:52 +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 17iNWe-0005ML-00; Fri, 23 Aug 2002 19:07:32 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17iNV1-0005LB-00 for emacs-devel@gnu.org; Fri, 23 Aug 2002 19:05:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17iNUQ-0005IE-00 for emacs-devel@gnu.org; Fri, 23 Aug 2002 19:05:50 -0400 Original-Received: from mail6.fw-sj.sony.com ([160.33.82.73]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17iNTq-0005FX-00; Fri, 23 Aug 2002 19:04:38 -0400 Original-Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.11]) by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id XAA23284; Fri, 23 Aug 2002 23:04:36 GMT Original-Received: by mail1.bc.in.sel.sony.com id XAA26647; Fri, 23 Aug 2002 23:04:29 GMT Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200208232229.g7NMTor08563@rum.cs.yale.edu> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-3.0.63 on Emacs-21.3.50.1 (i386-msvc-nt5.0.2195) of 2002-08-22 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:6817 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6817 Fri, 23 Aug 2002 18:29:49 -0400: "Stefan Monnier" wrote: > > > [BTW, if it's decided that this _is_ a good feature, please call the > > > property something like `yank-preserved-properties' (actually I'm rather > > > fond of `yankable-properties') and make it a list of property names or t.] > > > > Sorry that the diff makes the change look complicated but what I > > proposed was an introduction of a new text property > > `yank-preserve-all-properties' instead of a new variable > > `yankable-properties' that holds properties to preserve. The actual > > Miles didn't propose a variable. He just suggested a more general > property with a different name and which includes yours as a special case. I see. Thanks for correcting my understanding. That makes sense. So in case of table the value of `yankable-properties' property should be like (keymap)? That is a good idea I think. The implementation probably is a bit more elaborate than what I proposed though. > Use the -b and -w switches to diff to make the diff more human > readable (and a bit less computer-usable, but it's OK in this case). Yes, it looks much better. Thanks. *** ../../pure/emacs-21.3.50/lisp/subr.el Fri Aug 2 21:26:30 2002 --- subr.el Fri Aug 23 13:54:44 2002 *************** *** 1415,1420 **** --- 1415,1421 ---- (defun remove-yank-excluded-properties (start end) "Remove `yank-excluded-properties' between START and END positions. Replaces `category' properties with their defined properties." + (unless (text-property-any start end 'yank-preserve-all-properties t) (let ((inhibit-read-only t)) ;; Replace any `category' property with the properties it stands for. (unless (memq yank-excluded-properties '(t nil)) *************** *** 1435,1441 **** (if (eq yank-excluded-properties t) (set-text-properties start end nil) (remove-list-of-text-properties start end ! yank-excluded-properties)))) (defun insert-for-yank (&rest strings) "Insert STRINGS at point, stripping some text properties. --- 1436,1442 ---- (if (eq yank-excluded-properties t) (set-text-properties start end nil) (remove-list-of-text-properties start end ! yank-excluded-properties))))) (defun insert-for-yank (&rest strings) "Insert STRINGS at point, stripping some text properties. -Tak