Function: y-or-n-p-insert-other
y-or-n-p-insert-other is an interactive and byte-compiled function
defined in subr.el.gz.
Signature
(y-or-n-p-insert-other)
Documentation
Handle inserting of other answers in the minibuffer of y-or-n-p.
Display an error on trying to insert a disallowed character. Also discard all previous input in the minibuffer.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun y-or-n-p-insert-other ()
"Handle inserting of other answers in the minibuffer of `y-or-n-p'.
Display an error on trying to insert a disallowed character.
Also discard all previous input in the minibuffer."
(interactive)
(when (minibufferp)
(delete-minibuffer-contents)
(ding)
(discard-input)
(minibuffer-message "Please answer y or n")
(sit-for 2)))