]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-for-yank-1): If last inserted char has properties,
authorRichard M. Stallman <rms@gnu.org>
Wed, 18 Oct 2006 10:56:46 +0000 (10:56 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 18 Oct 2006 10:56:46 +0000 (10:56 +0000)
mark them as rear-nonsticky.

lisp/subr.el

index 15d819063a41b0faeed4c4dce902f1cccb47c40d..1f874be60e0fbdbeba9ca208983b9d52262fbca5 100644 (file)
@@ -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