emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1aa31b5 2/2: Fix property stripping in image-file-y


From: Basil L. Contovounesios
Subject: [Emacs-diffs] master 1aa31b5 2/2: Fix property stripping in image-file-yank-handler
Date: Thu, 1 Aug 2019 10:17:23 -0400 (EDT)

branch: master
commit 1aa31b5f8911cc422644916c7652a90add7d5fd5
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    Fix property stripping in image-file-yank-handler
    
    Fix proposed by Martin Rudalics <address@hidden> 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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/image-file.el b/lisp/image-file.el
index 26f16d1..c1d44a7 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]