aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-08-29 05:37:05 +0000
committerKenichi Handa2000-08-29 05:37:05 +0000
commitcba62b78c317d43c935a7a9aa9c70d56b34b8db7 (patch)
tree4c13e5e6471b63c45fbe42a51c2ee34e276f63c1
parentd313265faf0962fe3392912cb84f47f6d57b3b34 (diff)
downloademacs-cba62b78c317d43c935a7a9aa9c70d56b34b8db7.tar.gz
emacs-cba62b78c317d43c935a7a9aa9c70d56b34b8db7.zip
(help-xref-mule-regexp): New variable
(help-make-xrefs): Handle help-xref-mule-regexp.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/help.el40
2 files changed, 41 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a8794f3b78..56f46e7bd27 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,6 @@
12000-08-29 Kenichi Handa <handa@etl.go.jp> 12000-08-29 Kenichi Handa <handa@etl.go.jp>
2 2
3 * help.el (help-xref-mule-regexp): New variable 3 * help.el (help-xref-mule-regexp): New variable.
4 (help-make-xrefs): Handle help-xref-mule-regexp. 4 (help-make-xrefs): Handle help-xref-mule-regexp.
5 5
6 * international/mule-cmds.el (help-xref-mule-regexp-template): New 6 * international/mule-cmds.el (help-xref-mule-regexp-template): New
diff --git a/lisp/help.el b/lisp/help.el
index abb59fc0b16..4c8fa346eaa 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1056,6 +1056,14 @@ Must be previously-defined."
1056The words preceding the quoted symbol can be used in doc strings to 1056The words preceding the quoted symbol can be used in doc strings to
1057distinguish references to variables, functions and symbols.") 1057distinguish references to variables, functions and symbols.")
1058 1058
1059(defconst help-xref-mule-regexp nil
1060 "Regexp matching doc string references to multilingualization related keywords.
1061
1062It is usually nil, and temporarily bound to a proper regexp while
1063executing multilingualiation related help commands
1064(e.g. describe-coding-system).")
1065
1066
1059(defconst help-xref-info-regexp 1067(defconst help-xref-info-regexp
1060 (purecopy "\\<[Ii]nfo[ \t\n]+node[ \t\n]+`\\([^']+\\)'") 1068 (purecopy "\\<[Ii]nfo[ \t\n]+node[ \t\n]+`\\([^']+\\)'")
1061 "Regexp matching doc string references to an Info node.") 1069 "Regexp matching doc string references to an Info node.")
@@ -1084,6 +1092,11 @@ with `help-follow'. Cross-references have the canonical form `...'
1084and the type of reference may be disambiguated by the preceding 1092and the type of reference may be disambiguated by the preceding
1085word(s) used in `help-xref-symbol-regexp'. 1093word(s) used in `help-xref-symbol-regexp'.
1086 1094
1095If the variable `help-xref-mule-regexp' is non-nil, find also
1096cross-reference information related to multiligualization issues
1097\(e.g. coding-system). This variable is also used to disambiguate the
1098type of reference as the same way as `help-xref-symbol-regexp'.
1099
1087A special reference `back' is made to return back through a stack of 1100A special reference `back' is made to return back through a stack of
1088help buffers. Variable `help-back-label' specifies the text for 1101help buffers. Variable `help-back-label' specifies the text for
1089that." 1102that."
@@ -1111,6 +1124,33 @@ that."
1111 (setq data (concat "(emacs)" data)))) 1124 (setq data (concat "(emacs)" data))))
1112 (help-xref-button 1 #'info data 1125 (help-xref-button 1 #'info data
1113 "mouse-2, RET: read this Info node")))) 1126 "mouse-2, RET: read this Info node"))))
1127 ;; Mule related keywords. Do this before trying
1128 ;; `help-xref-symbol-regexp' because some of Mule
1129 ;; keywords have variable or function definitions.
1130 (if help-xref-mule-regexp
1131 (save-excursion
1132 (while (re-search-forward help-xref-mule-regexp nil t)
1133 (let* ((data (match-string 5))
1134 (sym (intern-soft data)))
1135 (cond
1136 ((match-string 3) ; coding system
1137 (and (coding-system-p sym)
1138 (help-xref-button
1139 5 #'describe-coding-system sym
1140 "mouse-2, RET: describe this coding system")))
1141 ((match-string 4) ; input method
1142 (and (assoc data input-method-alist)
1143 (help-xref-button
1144 5 #'describe-input-method data
1145 "mouse-2, RET: describe this input method")))
1146 ((coding-system-p sym)
1147 (help-xref-button
1148 5 #'describe-coding-system sym
1149 "mouse-2, RET: describe this coding system"))
1150 ((assoc data input-method-alist)
1151 (help-xref-button
1152 5 #'describe-input-method data
1153 "mouse-2, RET: describe this input method")))))))
1114 ;; Quoted symbols 1154 ;; Quoted symbols
1115 (save-excursion 1155 (save-excursion
1116 (while (re-search-forward help-xref-symbol-regexp nil t) 1156 (while (re-search-forward help-xref-symbol-regexp nil t)