From 1d607f275458e14d36d00cccdcfb7b7bae55933b Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 28 Mar 2020 22:26:25 +0000 Subject: [PATCH] Fix handling of changed prefix keys in tutorial * 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. --- lisp/tutorial.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index d07737e333..a906af3b5a 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -427,11 +427,9 @@ tutorial--find-changed-keys ;; 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) -- 2.25.1