emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emoji 592b383: Add a top-level command


From: Lars Ingebrigtsen
Subject: scratch/emoji 592b383: Add a top-level command
Date: Tue, 26 Oct 2021 07:48:22 -0400 (EDT)

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

    Add a top-level command
---
 lisp/play/emoji.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lisp/play/emoji.el b/lisp/play/emoji.el
index fdde7fc..efabccc 100644
--- a/lisp/play/emoji.el
+++ b/lisp/play/emoji.el
@@ -25,9 +25,19 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl-lib))
+(require 'transient)
 
 (defvar emoji--labels nil)
 
+;;;###autoload
+(defun emoji-insert ()
+  "Choose and insert an emoji glyph."
+  (interactive)
+  (unless emoji--labels
+    (emoji--parse-labels)
+    (emoji--define-transient))
+  (funcall (intern "emoji-command-Emoji")))
+
 (defun emoji--parse-labels ()
   (setq emoji--labels nil)
   (with-temp-buffer
@@ -41,6 +51,7 @@
         (emoji--add-characters
          (cl-loop with range-start
                   and set
+                  and prev
                   for char across ranges
                   ;; a-z
                   if (eql char ?-)



reply via email to

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