[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 06488ded6b 2/2: Make `?' work again in read-multiple-choice
From: |
Lars Ingebrigtsen |
Subject: |
master 06488ded6b 2/2: Make `?' work again in read-multiple-choice |
Date: |
Thu, 17 Mar 2022 07:55:48 -0400 (EDT) |
branch: master
commit 06488ded6b9d8b4971e2e6c5b98b4fab6fe2d167
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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.
---
lisp/emacs-lisp/rmc.el | 11 ++++++-----
test/lisp/emacs-lisp/rmc-tests.el | 3 +--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index c450505dfd..195035e6be 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 ed30d82c3b..385b0fe44a 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