]> git.eshelyaron.com Git - emacs.git/commitdiff
; Complete merge of emoji.el
authorPo Lu <luangruo@yahoo.com>
Fri, 24 Nov 2023 00:45:18 +0000 (08:45 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 24 Nov 2023 00:45:18 +0000 (08:45 +0800)
* lisp/international/emoji.el (emoji-list): Import changes
from emacs-29.

lisp/international/emoji.el

index 8bb31e15b6101ffb20e9965d1d430b72811794ea..f2814c7a84b11fb32d2e33065cb18f9d132f9ec1 100644 (file)
@@ -156,11 +156,11 @@ and also consults the `emoji-alternate-names' alist."
 
 ;;;###autoload
 (defun emoji-list ()
-  "List emojis and insert the one that's selected.
+  "List emojis and allow selecting and inserting one of them.
 Select the emoji by typing \\<emoji-list-mode-map>\\[emoji-list-select] on its picture.
 The glyph will be inserted into the buffer that was current
 when the command was invoked."
-  (interactive "*")
+  (interactive)
   (let ((buf (current-buffer)))
     (emoji--init)
     (switch-to-buffer (get-buffer-create "*Emoji*"))
@@ -273,7 +273,9 @@ the name is not known."
     (let ((buf emoji--insert-buffer))
       (quit-window)
       (if (buffer-live-p buf)
-          (switch-to-buffer buf)
+          (progn
+            (switch-to-buffer buf)
+            (barf-if-buffer-read-only))
         (error "Buffer disappeared")))
     (let ((derived (gethash glyph emoji--derived)))
       (if derived