Mercurial > emacs
comparison lisp/novice.el @ 5927:c921af3939e8
(disabled-command-hook): Use eq to compare elts
of this-command-keys. Choose the appropriate kind of Meta.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Feb 1994 02:58:48 +0000 |
parents | 0449645855c3 |
children | b6a358a4bdfb |
comparison
equal
deleted
inserted
replaced
5926:240d2ad5803c | 5927:c921af3939e8 |
---|---|
40 ;;;###autoload | 40 ;;;###autoload |
41 (defun disabled-command-hook (&rest ignore) | 41 (defun disabled-command-hook (&rest ignore) |
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) ?\M-x) | 45 (if (eq (aref (this-command-keys) 0) |
46 (if (stringp (this-command-keys)) | |
47 (aref "\M-x" 0) | |
48 ?\M-x)) | |
46 (princ "You have invoked the disabled command ") | 49 (princ "You have invoked the disabled command ") |
47 (princ "You have typed ") | 50 (princ "You have typed ") |
48 (princ (key-description (this-command-keys))) | 51 (princ (key-description (this-command-keys))) |
49 (princ ", invoking disabled command ")) | 52 (princ ", invoking disabled command ")) |
50 (princ this-command) | 53 (princ this-command) |