summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-03-17 12:55:24 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-03-17 12:55:39 +0100
commit06488ded6b9d8b4971e2e6c5b98b4fab6fe2d167 (patch)
treea263fc0c149cbbb035f0c3ca37820b3f0f590f40
parent6bbd1cc5c9cd3db40dcb1ce82f478473b1f78131 (diff)
downloademacs-06488ded6b9d8b4971e2e6c5b98b4fab6fe2d167.tar.gz
Make `?' work again in read-multiple-choice
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Make the `?' key work again to show the help text.
-rw-r--r--lisp/emacs-lisp/rmc.el11
-rw-r--r--test/lisp/emacs-lisp/rmc-tests.el3
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index c450505dfd9..195035e6be9 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -169,8 +169,9 @@ Usage example:
\\='((?a \"always\")
(?s \"session only\")
(?n \"no\")))"
- (let* ((choices (if show-help choices (append choices '((?? "?")))))
- (altered-names (mapcar #'rmc--add-key-description choices))
+ (let* ((prompt-choices
+ (if show-help choices (append choices '((?? "?")))))
+ (altered-names (mapcar #'rmc--add-key-description prompt-choices))
(full-prompt
(format
"%s (%s): "
@@ -181,7 +182,7 @@ Usage example:
(save-excursion
(if show-help
(setq buf (rmc--show-help prompt help-string show-help
- choices altered-names)))
+ choices altered-names)))
(while (not tchar)
(message "%s%s"
(if wrong-char
@@ -200,7 +201,7 @@ Usage example:
(lambda (elem)
(cons (capitalize (cadr elem))
(car elem)))
- choices)))
+ prompt-choices)))
(condition-case nil
(let ((cursor-in-echo-area t))
(read-event))
@@ -238,7 +239,7 @@ Usage example:
(when wrong-char
(ding))
(setq buf (rmc--show-help prompt help-string show-help
- choices altered-names))))))
+ choices altered-names))))))
(when (buffer-live-p buf)
(kill-buffer buf))
(assq tchar choices)))
diff --git a/test/lisp/emacs-lisp/rmc-tests.el b/test/lisp/emacs-lisp/rmc-tests.el
index ed30d82c3b8..385b0fe44a5 100644
--- a/test/lisp/emacs-lisp/rmc-tests.el
+++ b/test/lisp/emacs-lisp/rmc-tests.el
@@ -86,7 +86,6 @@
a: [A]aa b: [B]bb c: [C]cc
a really long
description of ccc
- \n?: [?]
-")))))
+ \n")))))
;;; rmc-tests.el ends here