]> git.eshelyaron.com Git - emacs.git/commitdiff
Add help-char to the cache key in read-char-from-minibuffer as well
authorJuri Linkov <juri@linkov.net>
Thu, 12 Nov 2020 20:33:27 +0000 (22:33 +0200)
committerJuri Linkov <juri@linkov.net>
Thu, 12 Nov 2020 20:33:27 +0000 (22:33 +0200)
It's highly unlikely that help-char will be changed from its default value 8,
but formally there is a dependence on help-char.

lisp/subr.el

index cf569782ce7ea3e14e5f6d21823e48550678dac3..04d8132eaafff5e6f42eb94e758075880e13fca4 100644 (file)
@@ -2771,7 +2771,7 @@ 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 (gethash (cons help-form chars)
+                  (or (gethash (list help-form (cons help-char chars))
                                read-char-from-minibuffer-map-hash)
                       (let ((map (make-sparse-keymap))
                             (msg help-form))
@@ -2791,7 +2791,7 @@ 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)
-                        (puthash (cons help-form chars)
+                        (puthash (list help-form (cons help-char chars))
                                  map read-char-from-minibuffer-map-hash)
                         map))
                 read-char-from-minibuffer-map))