summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2020-12-30 11:54:01 +0200
committerJuri Linkov <juri@linkov.net>2020-12-30 11:54:01 +0200
commitcd4a51695fddf2a76ae9ed71efa8bfb4a515b32e (patch)
tree0ed215c038a9a0e20232e0944ee58c181f6c281c /lisp/files.el
parentbaeb82df8bcb8dd7dd783dbfb5561415da4ea3a9 (diff)
downloademacs-cd4a51695fddf2a76ae9ed71efa8bfb4a515b32e.tar.gz
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
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 70d451cccfa..637aaa130a4 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2141,7 +2141,7 @@ think it does, because \"free\" is pretty hard to define in practice."
("Yes" . ?y)
("No" . ?n)
("Open literally" . ?l)))
- (read-char-from-minibuffer
+ (read-char-choice
(concat prompt " (y)es or (n)o or (l)iterally ")
'(?y ?Y ?n ?N ?l ?L)))))
(cond ((memq choice '(?y ?Y)) nil)
@@ -3538,7 +3538,7 @@ n -- to ignore the local variables list.")
", or C-v/M-v to scroll")))
char)
(if offer-save (push ?! exit-chars))
- (setq char (read-char-from-minibuffer prompt exit-chars))
+ (setq char (read-char-choice prompt exit-chars))
(when (and offer-save (= char ?!) unsafe-vars)
(customize-push-and-save 'safe-local-variable-values unsafe-vars))
(prog1 (memq char '(?! ?\s ?y))