summaryrefslogtreecommitdiff
path: root/lisp/help-mode.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-25 18:49:03 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-25 18:49:03 +0000
commit7e2a83df6718cc94f8aa7acbd4a5399624c4c379 (patch)
treea3f1b8c470f3141e520568459fbf2b3b4f522a1c /lisp/help-mode.el
parenteb687116a4950e5a6f97f2476d946e3c27ae497e (diff)
downloademacs-7e2a83df6718cc94f8aa7acbd4a5399624c4c379.tar.gz
(help-function, help-variable, help-face)
(help-coding-system, help-input-method, help-character-set): Define each button type with its own explicit define-button-type.
Diffstat (limited to 'lisp/help-mode.el')
-rw-r--r--lisp/help-mode.el40
1 files changed, 33 insertions, 7 deletions
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index b3ca86f411d..ea83020ea3a 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -76,13 +76,39 @@ The format is (FUNCTION ARGS...).")
(button-get button 'help-function)
(button-get button 'help-args)))
-;; Make some button types that all use the same naming conventions
-(dolist (help-type '("function" "variable" "face"
- "coding-system" "input-method" "character-set"))
- (define-button-type (intern (purecopy (concat "help-" help-type)))
- :supertype 'help-xref
- 'help-function (intern (concat "describe-" help-type))
- 'help-echo (purecopy (concat "mouse-2, RET: describe this " help-type))))
+;; These 6 calls to define-button-type were generated in a dolist
+;; loop, but that is bad because it means these button types don't
+;; have an easily found definition.
+
+(define-button-type 'help-function
+ :supertype 'help-xref
+ 'help-function 'describe-function
+ 'help-echo (purecopy "mouse-2, RET: describe this function"))
+
+(define-button-type 'help-variable
+ :supertype 'help-xref
+ 'help-function 'describe-variable
+ 'help-echo (purecopy "mouse-2, RET: describe this variable"))
+
+(define-button-type 'help-face
+ :supertype 'help-xref
+ 'help-function 'describe-face
+ 'help-echo (purecopy "mouse-2, RET: describe this face"))
+
+(define-button-type 'help-coding-system
+ :supertype 'help-xref
+ 'help-function 'describe-coding-system
+ 'help-echo (purecopy "mouse-2, RET: describe this coding system"))
+
+(define-button-type 'help-input-method
+ :supertype 'help-xref
+ 'help-function 'describe-input-method
+ 'help-echo (purecopy "mouse-2, RET: describe this input method"))
+
+(define-button-type 'help-character-set
+ :supertype 'help-xref
+ 'help-function 'describe-character-set
+ 'help-echo (purecopy "mouse-2, RET: describe this character set"))
;; make some more ideosyncratic button types