# HG changeset patch # User Richard M. Stallman # Date 1113097663 0 # Node ID f2d616f518a58cc5ef35605600c2531e77afc6d0 # Parent 6b6f4fcc8035871a9629c1603f15cd9a6b8aa0e9 (describe-key-briefly, describe-key): Replace strings as event types with "(any string)". diff -r 6b6f4fcc8035 -r f2d616f518a5 lisp/help.el --- 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)