diff options
| author | Juri Linkov | 2020-11-12 03:38:44 +0200 |
|---|---|---|
| committer | Juri Linkov | 2020-11-12 03:38:44 +0200 |
| commit | 73536ffecb6d92151cfeaf1fbc7153aa14f42fb4 (patch) | |
| tree | 6d7e6c756d4fc1097470e4032df9a356e440359f | |
| parent | 17894ef565214c17d19304d9ce6a976c2588fd53 (diff) | |
| download | emacs-73536ffecb6d92151cfeaf1fbc7153aa14f42fb4.tar.gz emacs-73536ffecb6d92151cfeaf1fbc7153aa14f42fb4.zip | |
Use cache with help-char in read-char-from-minibuffer unless help-form is nil
| -rw-r--r-- | lisp/subr.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 3e17ef801b2..1129496e500 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 | |||
| 2771 | `help-char' to chars. It's bound automatically to `help-form-show'." | 2771 | `help-char' to chars. It's bound automatically to `help-form-show'." |
| 2772 | (let* ((empty-history '()) | 2772 | (let* ((empty-history '()) |
| 2773 | (map (if (consp chars) | 2773 | (map (if (consp chars) |
| 2774 | (or (and (gethash chars read-char-from-minibuffer-map-hash) | 2774 | (or (gethash (if help-form (cons help-char chars) chars) |
| 2775 | ;; Don't use cached keymap with `help-char'. | 2775 | read-char-from-minibuffer-map-hash) |
| 2776 | (not help-form)) | ||
| 2777 | (let ((map (make-sparse-keymap)) | 2776 | (let ((map (make-sparse-keymap)) |
| 2778 | (msg help-form)) | 2777 | (msg help-form)) |
| 2779 | (set-keymap-parent map read-char-from-minibuffer-map) | 2778 | (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 | |||
| 2792 | 'read-char-from-minibuffer-insert-char)) | 2791 | 'read-char-from-minibuffer-insert-char)) |
| 2793 | (define-key map [remap self-insert-command] | 2792 | (define-key map [remap self-insert-command] |
| 2794 | 'read-char-from-minibuffer-insert-other) | 2793 | 'read-char-from-minibuffer-insert-other) |
| 2795 | (unless help-form | 2794 | (puthash (if help-form (cons help-char chars) chars) |
| 2796 | ;; Don't cache keymap with `help-char'. | 2795 | map read-char-from-minibuffer-map-hash) |
| 2797 | (puthash chars map read-char-from-minibuffer-map-hash)) | ||
| 2798 | map)) | 2796 | map)) |
| 2799 | read-char-from-minibuffer-map)) | 2797 | read-char-from-minibuffer-map)) |
| 2800 | (result | 2798 | (result |