1 ;;; hsite-ex.el --- Site-specific setup for Hyperbole
3 ;; Copyright (C) 1991-1995, 2004, 2006 Free Software Foundation, Inc.
4 ;; Developed with support from Motorola Inc.
6 ;; Author: Bob Weiner, Brown U.
7 ;; Maintainer: Mats Lidell <matsl@contactor.se>
8 ;; Keywords: hypermedia, local
10 ;; This file is part of GNU Hyperbole.
12 ;; GNU Hyperbole is free software; you can redistribute it and/or
13 ;; modify it under the terms of the GNU General Public License as
14 ;; published by the Free Software Foundation; either version 3, or (at
15 ;; your option) any later version.
17 ;; GNU Hyperbole is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; See the "README" file for installation instructions.
31 ;; "hsite.el" may be byte-compiled if you like but normally it is not.
33 ;; Be sure to have users load any personal mail/news initializations
34 ;; before they load this file if any of Hyperbole's mail or news
35 ;; support features are enabled either herein or within their personal
36 ;; Hyperbole initializations. Otherwise, the mail/news support may
37 ;; not be configured properly.
43 ;;; Read the comments and modify as desired.
46 (message "Initializing Hyperbole, please wait...")
52 (defvar hkey-always-display-menu nil
53 "*Non-nil means always display the Smart Menu window when the Action or Assist Key is pressed and the Smart Menu system has been loaded.
54 If a Smart Menu is already displayed, perform another Action or Assist Key
57 (defcustom smart-scroll-proportional t
58 "*Non-nil means Smart Keys should scroll relative to current line when pressed at the end of a line.
59 Action Key moves current line to top of window. Assist Key moves current
60 line to bottom of window. Repeated presses then scroll up or down a
61 windowful. Nil value instead ignores current line and always scrolls up or
65 :link '(custom-manual "(hyperbole)Glossary"))
68 ;;; HYPERBOLE DIRECTORY SETTING
77 ;; String to be used in the call: (hpath:rfc rfc-num) to create an ange-ftp
78 ;; path to the RFC document for 'rfc-num'. Uncomment and alter this setting
79 ;; if another site is closer for you.
80 ;; (setq hpath:rfc "/anonymous@ds.internic.net:rfc/rfc%s.txt")
82 ;; When a user creates an explicit button, Hyperbole tries to store her
83 ;; Internet e-mail address with the button by using the formula, email-id =
84 ;; <user-id>@<domainname>. Not every system has its domainname set
85 ;; up properly, however. If you do a {M-x load-file hypb.elc RET} and then
86 ;; hit {C-x C-e} after the closing paren of the following function,
87 ;; (hypb:domain-name), you will see whether or not yours is configured
88 ;; properly. If it is not, uncomment the following line and set it to the
91 ;; (setenv "DOMAINNAME" "mot.com")
94 ;;; XEMACS, GNU EMACS 19, AND EPOCH CONFIGURATION
97 ;; No-op unless set by one of the conditionals below.
98 (defun hui:but-flash ())
100 (if (and hyperb:emacs19-p window-system)
102 (require 'hui-em19-b)
103 ;; Highlight explicit buttons whenever a file is read in.
104 (var:append 'find-file-hooks '(hproperty:but-create))
105 (fset 'hui:but-flash 'hproperty:but-flash)
107 ;; Substitute for the nil argument below a valid X color name with
108 ;; which to highlight buttons if the default highlighting does not
109 ;; appeal to you. See "hui-em19-b.el" for how this works.
110 (hproperty:cycle-but-color nil)
112 ;; Non-nil means visually emphasize that button under mouse cursor is
114 (setq hproperty:but-emphasize-p nil)
116 ;; If you find that the Hyperbole button flash time is too slow
117 ;; or too fast, adjust it here.
118 (setq hproperty:but-flash-time 1000)
121 (if (and hyperb:xemacs-p (not noninteractive))
123 (require 'hui-xe-but)
125 ;; If running XEmacs 19.8 or below, don't highlight explicit buttons
126 ;; whenever a file is read in since this can cause a sporadic crash
127 ;; when find-files are done.
128 (if hyperb:kotl-p (var:append 'find-file-hooks '(hproperty:but-create)))
129 (fset 'hui:but-flash 'hproperty:but-flash)
131 ;; Substitute for the nil argument below a valid X color name with
132 ;; which to highlight buttons if the default highlighting does not
133 ;; appeal to you. See "hui-xe-but.el" for how this works.
134 (hproperty:cycle-but-color nil)
136 ;; Non-nil means visually emphasize that button under mouse cursor is
138 (setq hproperty:but-emphasize-p nil)
140 ;; If you find that the Hyperbole button flash time is too slow
141 ;; or too fast, adjust it here.
142 (setq hproperty:but-flash-time 1000)
145 (if (and hyperb:epoch-p (string= hyperb:epoch-p "V4"))
147 (require 'hui-epV4-b)
148 ;; Highlight explicit buttons whenever a file is read in.
149 (var:append 'find-file-hooks '(hproperty:but-create))
150 (fset 'hui:but-flash 'hproperty:but-flash)
151 ;; Substitute for the nil argument below a valid X color name with
152 ;; which to highlight buttons if the default highlighting does not
153 ;; appeal to you. See "hui-epV4-b.el" for how this works.
154 (hproperty:cycle-but-color nil)
155 ;; If you use Epoch and find that the Hyperbole button flash time is
156 ;; too slow or too fast, adjust it here.
157 (defvar hproperty:but-flash-time 1000
158 "Machine specific value for empty loop counter, Epoch but flash delay.")
162 ;;; EXTERNAL SYSTEM ENCAPSULATIONS
165 ;;; Support for encapsulations of any of these external systems may be
166 ;;; enabled here. You should be familiar with the external system before
167 ;;; you try to use the Hyperbole support for it.
168 ;;; Possible system encapsulations to include within the innermost set of
170 ;;; hsys-wais hsys-hbase
171 ;;; See files with the same name, e.g. "hsys-wais.el" for details on each
174 ;;; Note: hsys-w3 is automatically loaded by default by Hyperbole.
175 (setq hibtypes:begin-load-hook
176 (list (function (lambda () (mapcar 'require '())))))
179 ;;; ONLINE LIBRARY CONFIGURATION
182 ;;; Support for online library document id references is loaded here but
183 ;;; requires some additional configuration before use. See the DESCRIPTION
184 ;;; section in "hib-doc-id.el" for complete installation and use information.
186 (setq hibtypes:end-load-hook
187 (list (function (lambda () (mapcar 'require '(hib-doc-id))))))
190 ;;; HYPERBOLE INITIALIZATION
193 ;;; This call loads the whole Hyperbole system.
194 ;;; You may want to look at this file just to see what it does.
198 ;;; This call initializes the Hyperbole system for use.
203 ;;; FILE VIEWER COMMAND SETTINGS
206 (defvar hpath:display-alist
207 (let ((info-suffix "\\.info\\(-[0-9]+\\)?\\(\\.gz\\|\\.Z\\|-z\\)?$"))
209 ;; Run the OO-Browser on OOBR or OOBR-FTR Environment files.
210 '("OOBR\\(-FTR\\)?$" . br-env-browse)
211 ;; Display the top node from Info online manuals.
213 (concat (` (, info-suffix)) "\\|/info/[^.]+$\\|/info-local/[^.]+$")
215 (if (and (string-match (, info-suffix) file)
217 ;; Removed numbered trailer to get basic filename.
218 (setq file (concat (substring file 0 (match-beginning 1))
219 (substring file (match-end 1)))))
222 (Info-find-node file "Top")
223 (error (if (and file (file-exists-p file))
225 (if (get-buffer "*info*")
226 (kill-buffer "*info*"))
227 (Info-find-node file "*" nil t))
228 (error "Invalid file")))))))
230 "*Alist of (FILENAME-REGEXP . EDIT-FUNCTION) elements for calling special
231 functions to display particular file types within Emacs. See also
232 'hpath:file-alist' for external display program settings.")
234 ;;; `hyperb:window-system' variable from "hversion.el" must be defined
235 ;;; prior to this variable definition.
237 (defvar hpath:find-alist
238 (let ((nextstep-suffixes '(("\\.\\(adaptor\\|app\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|e?ps\\|frame\\|gif\\|locus\\|Mesa\\|nib\\|project\\|rtf\\|sense\\|tiff\\|tree\\)$" . "open")))
239 (x-suffixes '(("\\.e?ps$" . "ghostview")
240 ("\\.ps\\.g?[zZ]$" . "zcat %s | ghostview -")
241 ("\\.\\(gif\\|tiff?\\|xbm\\|pm\\|pbm\\|jpe?g\\)" . "xv")
242 ("\\.xwd$" . "xwud -noclick -in")
243 ("\\.ra?s$" . "snapshot -l")
245 ("\\.\\(fm\\|frame\\|mif\\)$" . "maker")
246 ("\\.\\(doc\\|boo\\)$" . "ileaf")
248 (if (memq window-system '(dps ns))
250 (cdr (assoc hyperb:window-system
251 (list (cons "emacs19" x-suffixes) ; GNU Emacs V19 under X
252 (cons "xemacs" x-suffixes) ; XEmacs under X
253 (cons "xterm" x-suffixes) ; GNU Emacs V18 under X
254 (cons "epoch" x-suffixes) ; UofI Epoch under X
255 '("sun" . nil) ; SunView
256 (cons "next" nextstep-suffixes)
257 '("apollo" . nil) ; Display Manager
259 "*Alist of (FILENAME-REGEXP . EDIT-PROGRAM) elements for using window system
260 dependent external programs to edit/display particular file types. See also
261 'hpath:display-alist' for internal, window-system independent display
265 ;;; LINK PATH VARIABLE SUBSTITUTION SETTINGS
268 ;;; The following variable permits sharing of links over wide areas, where
269 ;;; links may contain variable references whose values may differ between
270 ;;; link creator and link activator.
272 ;;; When a link is created, if its path contains a match for any of the
273 ;;; variable values in hpath:variables, then the variable's symbol is
274 ;;; substituted for the literal value. Hyperbole then replaces the variable
275 ;;; with a matching value when the link is resolved.
277 (defvar hpath:variables
278 '(hyperb:dir Info-directory Info-directory-list sm-directory load-path exec-path)
279 "*List of Emacs Lisp variable symbols to substitute within matching link paths.
280 Each variable value, if bound, must be either a pathname or a list of pathnames.")
283 ;;; HYPERBOLE LOCAL VARIABLE SUPPORT
286 ;;; Uncomment this if you really need to be able to use Hyperbole variables
287 ;;; (and others with colons in their names) within file local variable lists.
288 ;;; See the source file for more details.
293 ;;; SITE-SPECIFIC ADDITIONS - Add your Hyperbole configuration additions here.
297 ;;; END OF HYPERBOLE CONFIGURATION
302 (message "Hyperbole is ready for action.")
304 ;;; hsite-ex.el ends here