diff options
| -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 @@ | |||
| 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. |