# HG changeset patch # User Richard M. Stallman # Date 1161169006 0 # Node ID 56ea5a847db021edd7281d6cb7f0b3049675dd0d # Parent e6552aa7907c78f3bfbe1d869ab4b1d14bc63514 (insert-for-yank-1): If last inserted char has properties, mark them as rear-nonsticky. diff -r e6552aa7907c -r 56ea5a847db0 lisp/subr.el --- a/lisp/subr.el Wed Oct 18 10:55:32 2006 +0000 +++ b/lisp/subr.el Wed Oct 18 10:56:46 2006 +0000 @@ -2195,6 +2195,12 @@ (unless (nth 2 handler) ;; NOEXCLUDE (remove-yank-excluded-properties opoint (point))) + + ;; If last inserted char has properties, mark them as rear-nonsticky. + (if (and (> end opoint) + (text-properties-at (1- end))) + (put-text-property (1- end) end 'rear-nonsticky t)) + (if (eq yank-undo-function t) ;; not set by FUNCTION (setq yank-undo-function (nth 3 handler))) ;; UNDO (if (nth 4 handler) ;; COMMAND