From: Lars Ingebrigtsen Date: Wed, 22 Dec 2021 12:34:15 +0000 (+0100) Subject: Simplify disabled-command-function prompting X-Git-Tag: emacs-29.0.90~3514 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=70266929c3eb173fae0c64d56f8d402a805ca786;p=emacs.git 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. --- diff --git a/lisp/novice.el b/lisp/novice.el index 16766c253c5..a4d043574a7 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))