emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a7c9695 1/3: Fix handling of changed prefix keys in tutorial


From: Lars Ingebrigtsen
Subject: master a7c9695 1/3: Fix handling of changed prefix keys in tutorial
Date: Mon, 15 Nov 2021 01:38:28 -0500 (EST)

branch: master
commit a7c9695835a15bb5510a5938d9a664982170be5f
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 (bug#40725).
---
 lisp/tutorial.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 186bf35..bf98528 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -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)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]