aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/help.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2005-04-10 01:47:43 +0000
committerRichard M. Stallman <[email protected]>2005-04-10 01:47:43 +0000
commit36178ae8fb086e8ece1ca9408dfa18a2fe9e82ba (patch)
tree88cd35d4a102c9d6e5dfb629b2fb6cd4251e18a7 /lisp/help.el
parent18e2d91f52853c5e62d5f34e4f4238056d31a53b (diff)
(describe-key-briefly, describe-key): Replace
strings as event types with "(any string)".
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/help.el b/lisp/help.el
index aeffaf732a..a3e14014b7 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -586,7 +586,15 @@ the last key hit are used."
;; 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 @@ the last key hit are used."
(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)