]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix up smiley emoji application to make it reversible
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 18 Oct 2020 07:42:25 +0000 (09:42 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 18 Oct 2020 07:42:25 +0000 (09:42 +0200)
* lisp/gnus/smiley.el (smiley-region): Use text properties for the
emojis instead of rewriting the message.

lisp/gnus/smiley.el

index 7d6efacfe07274a5782a7987357aebe9d4e8b372..3edae04fcc06c341cdf97bf6ed07db82b99ee8d7 100644 (file)
@@ -227,7 +227,11 @@ A list of images is returned."
                   (progn
                    (gnus-add-image 'smiley image)
                    (gnus-put-image image string 'smiley))
-                (insert image)))))
+               ;; This is a string, but mark the property for
+               ;; deletion if the washing method is switched off.
+                (insert (propertize string
+                                   'display image
+                                   'gnus-image-category 'smiley))))))
        images))))
 
 ;;;###autoload