From 631890d8b95b828d3c56880c74fece58bf8ad4bf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 18 Oct 2006 10:56:46 +0000 Subject: [PATCH] (insert-for-yank-1): If last inserted char has properties, mark them as rear-nonsticky. --- lisp/subr.el | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.5