Mercurial > emacs
changeset 61423:f2d616f518a5
(describe-key-briefly, describe-key): Replace
strings as event types with "(any string)".
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 10 Apr 2005 01:47:43 +0000 |
parents | 6b6f4fcc8035 |
children | ad05d91d3598 |
files | lisp/help.el |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help.el Sun Apr 10 01:45:58 2005 +0000 +++ b/lisp/help.el Sun Apr 10 01:47:43 2005 +0000 @@ -586,7 +586,15 @@ ;; Ok, now look up the key and name the command. (let ((defn (or (string-key-binding key) (key-binding key))) - (key-desc (help-key-description key untranslated))) + key-desc) + ;; Don't bother user with strings from (e.g.) the select-paste menu. + (if (stringp (aref key (1- (length key)))) + (aset key (1- (length key)) "(any string)")) + (if (stringp (aref untranslated (1- (length untranslated)))) + (aset untranslated (1- (length untranslated)) + "(any string)")) + ;; Now describe the key, perhaps as changed. + (setq key-desc (help-key-description key untranslated)) (if (or (null defn) (integerp defn) (equal defn 'undefined)) (princ (format "%s is undefined" key-desc)) (princ (format (if (windowp window) @@ -623,6 +631,12 @@ (if (or (null defn) (integerp defn) (equal defn 'undefined)) (message "%s is undefined" (help-key-description key untranslated)) (help-setup-xref (list #'describe-function defn) (interactive-p)) + ;; Don't bother user with strings from (e.g.) the select-paste menu. + (if (stringp (aref key (1- (length key)))) + (aset key (1- (length key)) "(any string)")) + (if (stringp (aref untranslated (1- (length untranslated)))) + (aset untranslated (1- (length untranslated)) + "(any string)")) (with-output-to-temp-buffer (help-buffer) (princ (help-key-description key untranslated)) (if (windowp window)