[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 73536ff: Use cache with help-char in read-char-from-minibuffer un
From: |
Juri Linkov |
Subject: |
master 73536ff: Use cache with help-char in read-char-from-minibuffer unless help-form is nil |
Date: |
Wed, 11 Nov 2020 20:39:14 -0500 (EST) |
branch: master
commit 73536ffecb6d92151cfeaf1fbc7153aa14f42fb4
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Use cache with help-char in read-char-from-minibuffer unless help-form is
nil
---
lisp/subr.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 3e17ef8..1129496 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2771,9 +2771,8 @@ If the caller has set `help-form', there is no need to
explicitly add
`help-char' to chars. It's bound automatically to `help-form-show'."
(let* ((empty-history '())
(map (if (consp chars)
- (or (and (gethash chars read-char-from-minibuffer-map-hash)
- ;; Don't use cached keymap with `help-char'.
- (not help-form))
+ (or (gethash (if help-form (cons help-char chars) chars)
+ read-char-from-minibuffer-map-hash)
(let ((map (make-sparse-keymap))
(msg help-form))
(set-keymap-parent map read-char-from-minibuffer-map)
@@ -2792,9 +2791,8 @@ If the caller has set `help-form', there is no need to
explicitly add
'read-char-from-minibuffer-insert-char))
(define-key map [remap self-insert-command]
'read-char-from-minibuffer-insert-other)
- (unless help-form
- ;; Don't cache keymap with `help-char'.
- (puthash chars map
read-char-from-minibuffer-map-hash))
+ (puthash (if help-form (cons help-char chars) chars)
+ map read-char-from-minibuffer-map-hash)
map))
read-char-from-minibuffer-map))
(result
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 73536ff: Use cache with help-char in read-char-from-minibuffer unless help-form is nil,
Juri Linkov <=