(minibuffer-message "Wrong answer")
(sit-for 2)))
-(defvar empty-history)
-
(defun read-char-from-minibuffer (prompt &optional chars history)
"Read a character from the minibuffer, prompting for it with PROMPT.
Like `read-char', but uses the minibuffer to read and return a character.
causes it to evaluate `help-form' and display the result.
There is no need to explicitly add `help-char' to CHARS;
`help-char' is bound automatically to `help-form-show'."
+ (defvar empty-history)
(let* ((empty-history '())
(map (if (consp chars)
(or (gethash (list help-form (cons help-char chars))
"Prefer `read-key' when answering a \"y or n\" question by `y-or-n-p'.
Otherwise, use the minibuffer.")
-(defvar empty-history)
-
(defun y-or-n-p (prompt)
"Ask user a \"y or n\" question.
Return t if answer is \"y\" and nil if it is \"n\".
(discard-input)))
(t
(setq prompt (funcall padded prompt))
+ (defvar empty-history)
(let* ((empty-history '())
(enable-recursive-minibuffers t)
(msg help-form)