]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix handling of changed prefix keys in tutorial
authorBasil L. Contovounesios <contovob@tcd.ie>
Mon, 15 Nov 2021 05:52:38 +0000 (06:52 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 15 Nov 2021 06:38:21 +0000 (07:38 +0100)
* lisp/tutorial.el (tutorial--find-changed-keys): Use keymapp to
detect prefix definitions rather than hard-coding them.  A notable
omission from the hard-coded list was mode-specific-command-prefix,
whose subcommands are often rebound (bug#40725).

lisp/tutorial.el

index 186bf35fe7e9c0a1ea4bf3ab06ff2069013fa88d..bf985280d80a876c391da96ada13d97f3ef2ba14 100644 (file)
@@ -423,11 +423,9 @@ where
               ;; Handle prefix definitions specially
               ;; so that a mode that rebinds some subcommands
               ;; won't make it appear that the whole prefix is gone.
-              (key-fun (if (eq def-fun 'ESC-prefix)
-                           (lookup-key global-map [27])
-                         (if (eq def-fun 'Control-X-prefix)
-                             (lookup-key global-map [24])
-                           (key-binding key))))
+               (key-fun (if (keymapp def-fun)
+                            (lookup-key global-map key)
+                          (key-binding key)))
               (where (where-is-internal (if rem-fun rem-fun def-fun)))
               cwhere)