From: Richard M. Stallman Date: Wed, 18 Oct 2006 10:56:46 +0000 (+0000) Subject: (insert-for-yank-1): If last inserted char has properties, X-Git-Tag: emacs-pretest-22.0.90~85 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=631890d8b95b828d3c56880c74fece58bf8ad4bf;p=emacs.git (insert-for-yank-1): If last inserted char has properties, mark them as rear-nonsticky. --- diff --git a/lisp/subr.el b/lisp/subr.el index 15d819063a4..1f874be60e0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2195,6 +2195,12 @@ If UNDO is present and non-nil, it is a function that will be called (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