From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Copying preserves font-lock-face Date: Tue, 26 Sep 2006 11:41:41 -0400 Message-ID: References: <17684.33575.513181.276604@kahikatea.snap.net.nz> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1159285583 15273 80.91.229.2 (26 Sep 2006 15:46:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Sep 2006 15:46:23 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 26 17:46:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GSF5t-0001A3-K7 for ged-emacs-devel@m.gmane.org; Tue, 26 Sep 2006 17:43:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSF5s-00036G-QJ for ged-emacs-devel@m.gmane.org; Tue, 26 Sep 2006 11:43:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GSF43-0000EL-5L for emacs-devel@gnu.org; Tue, 26 Sep 2006 11:41:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GSF42-0000CS-5o for emacs-devel@gnu.org; Tue, 26 Sep 2006 11:41:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GSF41-0000C6-Ve for emacs-devel@gnu.org; Tue, 26 Sep 2006 11:41:42 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GSF8h-0004Tg-3g for emacs-devel@gnu.org; Tue, 26 Sep 2006 11:46:31 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1GSF41-0001SL-8l; Tue, 26 Sep 2006 11:41:41 -0400 Original-To: Kevin Rodgers In-reply-to: (message from Kevin Rodgers on Mon, 25 Sep 2006 16:32:45 -0600) 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:60239 Archived-At: On the topic of yanking fontified text into non-font-lock buffers, I became annoyed when any following keyed text would inherit those properties, so I put this in my .emacs file: (defadvice yank (after rear-nonsticky activate) "Make all yanked text properties rear-nonsticky, unless Font Lock is on." (unless font-lock-mode (put-text-property (region-beginning) (region-end) 'rear-nonsticky t))) That code can't be entirely right, since the treatment of properties not related to faces shouldn't depend on font-lock-mode. Nonetheless, you might be getting at a good point. Perhaps insert-for-yank should do this unconditionally for face properties only. Does anyone disagree?