[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 dfb3dcb404c: Allow listing Emoji from a read-only buffer
From: |
Eli Zaretskii |
Subject: |
emacs-29 dfb3dcb404c: Allow listing Emoji from a read-only buffer |
Date: |
Thu, 23 Nov 2023 09:08:48 -0500 (EST) |
branch: emacs-29
commit dfb3dcb404c75f19a3d22938c33390f362141fe2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Allow listing Emoji from a read-only buffer
* lisp/international/emoji.el (emoji-list): Don't barf here if the
original buffer is read-inly...
(emoji-list-select): ...barf here instead. (Bug#67400)
(emoji-list): Doc fix.
---
lisp/international/emoji.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el
index 8a34be91d10..4070553be55 100644
--- a/lisp/international/emoji.el
+++ b/lisp/international/emoji.el
@@ -103,11 +103,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*"))
@@ -219,7 +219,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"))))))
(if (not derived)
;; Glyph without derivations.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 dfb3dcb404c: Allow listing Emoji from a read-only buffer,
Eli Zaretskii <=