From cd4a51695fddf2a76ae9ed71efa8bfb4a515b32e Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 30 Dec 2020 11:54:01 +0200 Subject: Add variables read-char-choice-use-read-key and y-or-n-p-use-read-key * lisp/subr.el (read-char-choice-use-read-key): New variable. (read-char-choice): Use read-char-from-minibuffer when read-char-choice-use-read-key is nil. (y-or-n-p-use-read-key): New variable. (y-or-n-p): Restore old code that calls read-key to use it when y-or-n-p-use-read-key is non-nil. * lisp/dired-aux.el (dired--no-subst-ask, dired-query): * lisp/files.el (files--ask-user-about-large-file) (hack-local-variables-confirm): * lisp/userlock.el (ask-user-about-supersession-threat): * lisp/wid-edit.el (widget-choose): Revert to use read-char-choice instead of read-char-from-minibuffer. https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01919.html --- lisp/userlock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/userlock.el') diff --git a/lisp/userlock.el b/lisp/userlock.el index ec763223379..249f40e9af9 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -159,7 +159,7 @@ really edit the buffer? (y, n, r or C-h) " (message "%s" prompt) (error "Cannot resolve conflict in batch mode")) (while (null answer) - (setq answer (read-char-from-minibuffer prompt choices)) + (setq answer (read-char-choice prompt choices)) (cond ((memq answer '(?? ?\C-h)) (ask-user-about-supersession-help) (setq answer nil)) -- cgit v1.2.1