aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-02-08 04:04:45 +0000
committerKarl Heuer1995-02-08 04:04:45 +0000
commitbe29d45333d366ef5a78e342bd728ed7f9b6aafb (patch)
treed3b37aa2773e64e6a561260e33b7ea4b73541764
parent9f5787aee4c15d7596d625c240f93b4569d7d9c2 (diff)
downloademacs-be29d45333d366ef5a78e342bd728ed7f9b6aafb.tar.gz
emacs-be29d45333d366ef5a78e342bd728ed7f9b6aafb.zip
(disabled-command-hook): Recognize ESC x as well as M-x.
-rw-r--r--lisp/novice.el20
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/novice.el b/lisp/novice.el
index 0d23f26b3a1..1a7a5075305 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -42,14 +42,18 @@
42 (let (char) 42 (let (char)
43 (save-window-excursion 43 (save-window-excursion
44 (with-output-to-temp-buffer "*Help*" 44 (with-output-to-temp-buffer "*Help*"
45 (if (eq (aref (this-command-keys) 0) 45 (let ((keys (this-command-keys)))
46 (if (stringp (this-command-keys)) 46 (if (or (eq (aref keys 0)
47 (aref "\M-x" 0) 47 (if (stringp keys)
48 ?\M-x)) 48 (aref "\M-x" 0)
49 (princ "You have invoked the disabled command ") 49 ?\M-x))
50 (princ "You have typed ") 50 (and (>= (length keys) 2)
51 (princ (key-description (this-command-keys))) 51 (eq (aref keys 0) meta-prefix-char)
52 (princ ", invoking disabled command ")) 52 (eq (aref keys 1) ?x)))
53 (princ "You have invoked the disabled command ")
54 (princ "You have typed ")
55 (princ (key-description keys))
56 (princ ", invoking disabled command ")))
53 (princ this-command) 57 (princ this-command)
54 (princ ":\n") 58 (princ ":\n")
55 ;; Print any special message saying why the command is disabled. 59 ;; Print any special message saying why the command is disabled.