Add CHARS arg to read-char-from-minibuffer compatible with read-char-choice.
* lisp/simple.el (read-char-history): Rename from read-char-from-minibuffer-history. (Bug#38076) (read-char-from-minibuffer-insert-char): Rename from read-char-from-minibuffer-self-insert. (read-char-from-minibuffer-map-hash): New defconst. (read-char-from-minibuffer-insert-other): New command. (read-char-from-minibuffer): Add optional args CHARS and HISTORY. (zap-to-char): Use 'read-char-history as HISTORY arg of read-char-from-minibuffer. * lisp/emacs-lisp/map-ynp.el (read-answer): Use sit-for instead of sleep-for. Replace short answer history yes-or-no-p-history with read-char-history.
This commit is contained in:
parent
a26a8cc1c8
commit
04ab674707
2 changed files with 61 additions and 24 deletions
|
@ -341,7 +341,7 @@ When `use-dialog-box' is t, pop up a dialog window to get user input."
|
|||
(delete-minibuffer-contents)
|
||||
(beep)
|
||||
(message message)
|
||||
(sleep-for 2)))
|
||||
(sit-for 2)))
|
||||
map)
|
||||
read-answer-map--memoize))))
|
||||
answer)
|
||||
|
@ -361,7 +361,7 @@ When `use-dialog-box' is t, pop up a dialog window to get user input."
|
|||
(short
|
||||
(read-from-minibuffer
|
||||
prompt nil short-answer-map nil
|
||||
'yes-or-no-p-history))
|
||||
'read-char-history))
|
||||
(t
|
||||
(read-from-minibuffer
|
||||
prompt nil nil nil
|
||||
|
@ -381,7 +381,7 @@ When `use-dialog-box' is t, pop up a dialog window to get user input."
|
|||
".\n")))
|
||||
(beep)
|
||||
(message message)
|
||||
(sleep-for 2)))
|
||||
(sit-for 2)))
|
||||
answer))
|
||||
|
||||
;;; map-ynp.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue