emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emoji 268d472: Don't fontify as derived if it's not


From: Lars Ingebrigtsen
Subject: scratch/emoji 268d472: Don't fontify as derived if it's not
Date: Tue, 26 Oct 2021 21:26:14 -0400 (EDT)

branch: scratch/emoji
commit 268d4728cfd55c666b0c87f0eb96ff421f8105ca
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Don't fontify as derived if it's not
---
 lisp/play/emoji.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/play/emoji.el b/lisp/play/emoji.el
index 7da9228..829c36e 100644
--- a/lisp/play/emoji.el
+++ b/lisp/play/emoji.el
@@ -113,9 +113,10 @@ when the command was issued."
                  (insert "\n")))
       (insert "\n\n"))))
 
-(defun emoji--fontify-char (char)
+(defun emoji--fontify-char (char &optional inhibit-derived)
   (propertize char 'face
-              (if (gethash char emoji--derived)
+              (if (and (not inhibit-derived)
+                       (gethash char emoji--derived))
                   'emoji-with-derivations
                 'emoji)))
 
@@ -364,7 +365,8 @@ when the command was issued."
                      collect (let ((this-char char))
                                (list
                                 (string i)
-                                (emoji--fontify-char char)
+                                (emoji--fontify-char
+                                 char inhibit-derived)
                                 (let ((derived
                                        (and (not inhibit-derived)
                                             (not (gethash char



reply via email to

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