summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-09-07 02:37:37 +0000
committerKenichi Handa <handa@m17n.org>2000-09-07 02:37:37 +0000
commit96ede6b2d5eea0b4865bb0b05978c4f86a125d6a (patch)
treeb7598451aa7940b6a222d2eff92e483d55f15adb /lisp/help.el
parent0a42d1341165a40c91317d854e690cef011dd4d2 (diff)
downloademacs-96ede6b2d5eea0b4865bb0b05978c4f86a125d6a.tar.gz
(help-make-xrefs): Adjusted for the change of
help-xref-mule-regexp. (help-insert-xref-button): New function.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el37
1 files changed, 30 insertions, 7 deletions
diff --git a/lisp/help.el b/lisp/help.el
index cb5083664a4..638ad6fa89e 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1130,27 +1130,36 @@ that."
(if help-xref-mule-regexp
(save-excursion
(while (re-search-forward help-xref-mule-regexp nil t)
- (let* ((data (match-string 5))
+ (let* ((data (match-string 7))
(sym (intern-soft data)))
(cond
((match-string 3) ; coding system
(and sym (coding-system-p sym)
(help-xref-button
- 5 #'describe-coding-system sym
+ 7 #'describe-coding-system sym
"mouse-2, RET: describe this coding system")))
((match-string 4) ; input method
(and (assoc data input-method-alist)
(help-xref-button
- 5 #'describe-input-method data
+ 7 #'describe-input-method data
"mouse-2, RET: describe this input method")))
+ ((or (match-string 5) (match-string 6)) ; charset
+ (and sym (charsetp sym)
+ (help-xref-button
+ 7 #'describe-character-set sym
+ "mouse-2, RET: describe this character set")))
+ ((assoc data input-method-alist)
+ (help-xref-button
+ 7 #'describe-input-method data
+ "mouse-2, RET: describe this input method"))
((and sym (coding-system-p sym))
(help-xref-button
- 5 #'describe-coding-system sym
+ 7 #'describe-coding-system sym
"mouse-2, RET: describe this coding system"))
- ((assoc data input-method-alist)
+ ((and sym (charsetp sym))
(help-xref-button
- 5 #'describe-input-method data
- "mouse-2, RET: describe this input method")))))))
+ 7 #'describe-character-set sym
+ "mouse-2, RET: describe this character set")))))))
;; Quoted symbols
(save-excursion
(while (re-search-forward help-xref-symbol-regexp nil t)
@@ -1271,6 +1280,20 @@ If optional arg HELP-ECHO is supplied, it is used as a help string."
(match-end match-number)
'face help-highlight-face))))
+(defun help-insert-xref-button (string function data &optional help-echo)
+ "Insert STRING and make a hyperlink fro cross-reference text on it.
+
+FUNCTION is a function to invoke when the button is activated, applied
+to DATA. DATA may be a single value or a list. See
+`help-make-xrefs'.
+If optional arg HELP-ECHO is supplied, it is used as a help string."
+ (let ((pos (point)))
+ (insert string)
+ (goto-char pos)
+ (search-forward string)
+ (help-xref-button 0 function data help-echo)))
+
+
;; Additional functions for (re-)creating types of help buffers.
(defun help-xref-interned (symbol)