]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix property stripping in image-file-yank-handler
authorBasil L. Contovounesios <contovob@tcd.ie>
Thu, 1 Aug 2019 13:30:15 +0000 (16:30 +0300)
committerBasil L. Contovounesios <contovob@tcd.ie>
Thu, 1 Aug 2019 14:16:05 +0000 (17:16 +0300)
Fix proposed by Martin Rudalics <rudalics@gmx.at> in:
https://lists.gnu.org/archive/html/emacs-devel/2008-12/msg00945.html
* lisp/image-file.el (image-file-yank-handler): Handle case when
yank-excluded-properties is t.

lisp/image-file.el

index 26f16d1ed25a7a9a97a9e4d505a6ffa63062c352..c1d44a7d6d6a00ece988f1108ff473b48f8bf6ea 100644 (file)
@@ -140,7 +140,9 @@ absolute file name and number of characters inserted."
   "Yank handler for inserting an image into a buffer."
   (let ((len (length string))
        (image (get-text-property 0 'display string)))
-    (remove-list-of-text-properties 0 len yank-excluded-properties string)
+    (if (eq yank-excluded-properties t)
+        (set-text-properties 0 len () string)
+      (remove-list-of-text-properties 0 len yank-excluded-properties string))
     (if (consp image)
        (add-text-properties 0
                             (or (next-single-property-change 0 'image-counter string)