Fix display of disabled-command help text

* lisp/novice.el (disabled-command-function): Improve wording, and
make sure the prompt doesn't exceed one screen line, so that the
mini-window is not resized (which gets in the way of fitting the
window to the size of the help text), and the help text is fully
visible when Emacs prompts for input.  (Bug#62146)
This commit is contained in:
Eli Zaretskii 2023-03-12 19:32:02 +02:00
parent 3ce37db988
commit 1c05175c21

View file

@ -79,16 +79,16 @@ If nil, the feature is disabled, i.e., all commands work normally.")
Do you want to use this command anyway?
You can now type:
\\`y' to try it and enable it (no questions if you use it again).
\\`n' to cancel--don't try the command, and it remains disabled.
\\`n' (also C-g) to cancel--don't try the command; it remains disabled.
\\`y' to enable the command (no questions if you use it again).
\\`SPC' to try the command just this once, but leave it disabled.
\\`!' to try it, and enable all disabled commands for this session only.")))
\\`!' to enable it and all the disabled commands for this session.")))
(char
(car (read-multiple-choice "Use this command?"
'((?y "yes")
(?n "no")
(?! "yes; enable for session")
(?\s "(space bar) yes; once"))
'((?n "no")
(?y "yes")
(?\s "(space bar) only once")
(?! "use and enable all"))
help-string
"*Disabled Command*"))))
(pcase char