emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emoji 27b1c02: Add list-chosen emojis to recents, too


From: Lars Ingebrigtsen
Subject: scratch/emoji 27b1c02: Add list-chosen emojis to recents, too
Date: Wed, 27 Oct 2021 08:38:23 -0400 (EDT)

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

    Add list-chosen emojis to recents, too
---
 lisp/play/emoji.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/play/emoji.el b/lisp/play/emoji.el
index a15c8d9..c3ad1cf 100644
--- a/lisp/play/emoji.el
+++ b/lisp/play/emoji.el
@@ -160,6 +160,7 @@ when the command was issued."
                  (error "Buffer disappeared"))))))
       (if (not derived)
           (progn
+            (emoji--add-recent glyph)
             (funcall end-func)
             (insert glyph))
         (let ((emoji--done-derived (make-hash-table :test #'equal)))
@@ -430,7 +431,7 @@ when the command was issued."
   (setq emoji--recent (delete char emoji--recent))
   (push char emoji--recent)
   ;; Shorten the list.
-  (when-let ((tail (nthcdr 10 emoji--recent)))
+  (when-let ((tail (nthcdr 30 emoji--recent)))
     (setcdr tail nil)))
 
 (defun emoji--columnize (list columns)
@@ -509,7 +510,9 @@ We prefer the earliest unique letter."
            (derived (gethash glyph emoji--derived)))
       (if (not derived)
           ;; Simple glyph with no derivations.
-          (insert glyph)
+          (progn
+            (emoji--add-recent glyph)
+            (insert glyph))
         ;; Choose a derived version.
         (let ((emoji--done-derived (make-hash-table :test #'equal)))
           (setf (gethash glyph emoji--done-derived) t)



reply via email to

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