|
From: | Stefan Monnier |
Subject: | Re: [Emacs-diffs] master c5e89be: On C-y, stop some text property entries being written into buffer-undo-list |
Date: | Wed, 22 Apr 2015 10:34:20 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> + (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. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |