From d96734729d0ed1fb854231c1ede3895c04c5b8ea Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 18 Oct 2020 09:42:25 +0200 Subject: [PATCH] Fix up smiley emoji application to make it reversible * lisp/gnus/smiley.el (smiley-region): Use text properties for the emojis instead of rewriting the message. --- lisp/gnus/smiley.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el index 7d6efacfe07..3edae04fcc0 100644 --- a/lisp/gnus/smiley.el +++ b/lisp/gnus/smiley.el @@ -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 -- 2.39.2