Mercurial > emacs
changeset 10695:1a97dea087d1
(disabled-command-hook): Recognize ESC x as well as M-x.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 08 Feb 1995 04:04:45 +0000 |
parents | 75792481da0c |
children | 5cf8a7a41664 |
files | lisp/novice.el |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/novice.el Wed Feb 08 03:52:28 1995 +0000 +++ b/lisp/novice.el Wed Feb 08 04:04:45 1995 +0000 @@ -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.