emacs-diffs
[Top][All Lists]
Advanced

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

master 7026692: Simplify disabled-command-function prompting


From: Lars Ingebrigtsen
Subject: master 7026692: Simplify disabled-command-function prompting
Date: Wed, 22 Dec 2021 07:36:29 -0500 (EST)

branch: master
commit 70266929c3eb173fae0c64d56f8d402a805ca786
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Simplify disabled-command-function prompting
    
    * lisp/novice.el (disabled-command-function): Use a prompt for
    `read-event' instead of messaging it, so that people using
    Emacspeak get the prompt read to them.
---
 lisp/novice.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/novice.el b/lisp/novice.el
index 16766c2..a4d0435 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -88,14 +88,13 @@ SPC to try the command just this once, but leave it 
disabled.
         ;;   (help-mode))
         )
      (fit-window-to-buffer (get-buffer-window "*Disabled Command*"))
-     (message "Type y, n, ! or SPC (the space bar): ")
      (let ((cursor-in-echo-area t))
-       (while (progn (setq char (read-event))
+       (while (progn (setq char (read-event
+                                 "Type y, n, ! or SPC (the space bar): "))
                     (or (not (numberp char))
                         (not (memq (downcase char)
                                    '(?! ?y ?n ?\s ?\C-g)))))
-        (ding)
-        (message "Please type y, n, ! or SPC (the space bar): "))))
+        (ding))))
     (setq char (downcase char))
     (pcase char
      (?\C-g (setq quit-flag t))



reply via email to

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