diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-02-08 04:04:45 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-02-08 04:04:45 +0000 |
commit | be29d45333d366ef5a78e342bd728ed7f9b6aafb (patch) | |
tree | d3b37aa2773e64e6a561260e33b7ea4b73541764 /lisp/novice.el | |
parent | 9f5787aee4c15d7596d625c240f93b4569d7d9c2 (diff) | |
download | emacs-be29d45333d366ef5a78e342bd728ed7f9b6aafb.tar.gz |
(disabled-command-hook): Recognize ESC x as well as M-x.
Diffstat (limited to 'lisp/novice.el')
-rw-r--r-- | lisp/novice.el | 20 |
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 @@ (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. |