]> git.eshelyaron.com Git - emacs.git/commitdiff
(disabled-command-hook): Recognize ESC x as well as M-x.
authorKarl Heuer <kwzh@gnu.org>
Wed, 8 Feb 1995 04:04:45 +0000 (04:04 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 8 Feb 1995 04:04:45 +0000 (04:04 +0000)
lisp/novice.el

index 0d23f26b3a1e24eeec565ed848fa13cbc197218d..1a7a5075305a08da9c75c08a4feef44474ee6403 100644 (file)
   (let (char)
     (save-window-excursion
      (with-output-to-temp-buffer "*Help*"
-       (if (eq (aref (this-command-keys) 0)
-              (if (stringp (this-command-keys))
-                  (aref "\M-x" 0)
-                ?\M-x))
-          (princ "You have invoked the disabled command ")
-        (princ "You have typed ")
-        (princ (key-description (this-command-keys)))
-        (princ ", invoking disabled command "))
+       (let ((keys (this-command-keys)))
+        (if (or (eq (aref keys 0)
+                    (if (stringp keys)
+                        (aref "\M-x" 0)
+                      ?\M-x))
+                (and (>= (length keys) 2)
+                     (eq (aref keys 0) meta-prefix-char)
+                     (eq (aref keys 1) ?x)))
+            (princ "You have invoked the disabled command ")
+          (princ "You have typed ")
+          (princ (key-description keys))
+          (princ ", invoking disabled command ")))
        (princ this-command)
        (princ ":\n")
        ;; Print any special message saying why the command is disabled.