emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emoji ef8de7c: Make emojis larger in the menus


From: Lars Ingebrigtsen
Subject: scratch/emoji ef8de7c: Make emojis larger in the menus
Date: Tue, 26 Oct 2021 21:15:48 -0400 (EDT)

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

    Make emojis larger in the menus
---
 lisp/play/emoji.el | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/lisp/play/emoji.el b/lisp/play/emoji.el
index c3de522..ca1091a 100644
--- a/lisp/play/emoji.el
+++ b/lisp/play/emoji.el
@@ -37,11 +37,16 @@
   "Face for emoji list headers."
   :version "29.1")
 
+(defface emoji
+  '((t :height 2.0))
+  "Face used when displaying an emoji."
+  :version "29.1")
+
 (defface emoji-with-derivations
   '((((background dark))
-     (:background "#202020"))
+     (:background "#202020" :inherit emoji))
     (((background light))
-     (:background "blue")))
+     (:background "#e0e0e0" :inherit emoji)))
   "Face for emojis that have derivations."
   :version "29.1")
 
@@ -109,9 +114,10 @@ when the command was issued."
       (insert "\n\n"))))
 
 (defun emoji--fontify-char (char)
-  (if (gethash char emoji--derived)
-      (propertize char 'face 'emoji-with-derivations)
-    char))
+  (propertize char 'face
+              (if (gethash char emoji--derived)
+                  'emoji-with-derivations
+                'emoji)))
 
 (defun emoji--name (char)
   (or (gethash char emoji--names)
@@ -164,11 +170,12 @@ when the command was issued."
           (error "Unknown name")
         (message "%s" name)))))
 
-(defun emoji--init ()
+(defun emoji--init (&optional force)
   ;; Remove debugging.
   (setq transient-use-variable-pitch t)
   (setq transient--use-variable-pitch t)
-  (unless emoji--labels
+  (when (or (not emoji--labels)
+            force)
     (setq emoji--derived (make-hash-table :test #'equal))
     (emoji--parse-labels)
     (emoji--parse-normal-derived)
@@ -385,7 +392,7 @@ when the command was issued."
                                       (insert this-char)))))))))
          (args (apply #'vector mname
                       (emoji--columnize layout
-                                        (if has-subs 2 10)))))
+                                        (if has-subs 2 8)))))
     ;; There's probably a better way to do this...
     (setf (symbol-function name)
           (lambda ()



reply via email to

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