summaryrefslogtreecommitdiff
path: root/lisp/image-file.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2019-08-01 16:30:15 +0300
committerBasil L. Contovounesios <contovob@tcd.ie>2019-08-01 17:16:05 +0300
commit1aa31b5f8911cc422644916c7652a90add7d5fd5 (patch)
treeb4a2c2f2a47c17ae167baccea7faa48982fac8dc /lisp/image-file.el
parent2267110b6f00bbb0ad87f4621e6ecd9dc1bd8581 (diff)
downloademacs-1aa31b5f8911cc422644916c7652a90add7d5fd5.tar.gz
Fix property stripping in image-file-yank-handler
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.
Diffstat (limited to 'lisp/image-file.el')
-rw-r--r--lisp/image-file.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/image-file.el b/lisp/image-file.el
index 26f16d1ed25..c1d44a7d6d6 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)