From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master c5e89be: On C-y, stop some text property entries being written into buffer-undo-list Date: Sat, 25 Apr 2015 20:53:34 +0000 Message-ID: <20150425205334.GA30165@acm.fritz.box> References: <20150422095031.27238.96994@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1429995258 11413 80.91.229.3 (25 Apr 2015 20:54:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2015 20:54:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 25 22:54:10 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ym75A-000589-Hs for ged-emacs-devel@m.gmane.org; Sat, 25 Apr 2015 22:53:48 +0200 Original-Received: from localhost ([::1]:49310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym759-0000F8-U6 for ged-emacs-devel@m.gmane.org; Sat, 25 Apr 2015 16:53:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym74y-0000Ex-F3 for emacs-devel@gnu.org; Sat, 25 Apr 2015 16:53:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ym74u-0004YJ-EE for emacs-devel@gnu.org; Sat, 25 Apr 2015 16:53:36 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:62999 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ym74u-0004Xk-3x for emacs-devel@gnu.org; Sat, 25 Apr 2015 16:53:32 -0400 Original-Received: (qmail 26174 invoked by uid 3782); 25 Apr 2015 20:53:30 -0000 Original-Received: from acm.muc.de (p548A4B8F.dip0.t-ipconnect.de [84.138.75.143]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 25 Apr 2015 22:53:28 +0200 Original-Received: (qmail 6338 invoked by uid 1000); 25 Apr 2015 20:53:34 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185893 Archived-At: Hello, Stefan. On Wed, Apr 22, 2015 at 10:34:20AM -0400, Stefan Monnier wrote: > > + (with-silent-modifications > > + (let ((inhibit-read-only t)) > > + (dolist (handler yank-handled-properties) > > + (let ((prop (car handler)) > > + (fun (cdr handler)) > > + (run-start start)) > > + (while (< run-start end) > > + (let ((value (get-text-property run-start prop)) > > + (run-end (next-single-property-change > > + run-start prop nil end))) > > + (funcall fun value run-start run-end) > Running the hook functions within with-silent-modifications sounds > dangerous since they may make modifications which shouldn't be ignored > (only the hooks can know). > > + (if (eq yank-excluded-properties t) > > + (set-text-properties start end nil) > > + (remove-list-of-text-properties start end yank-excluded-properties))))) > This is the part that needs to be wrapped. Sorry about that. I've corrected it now. > Stefan -- Alan Mackenzie (Nuremberg, Germany).