comparison lisp/hyperbole/hsite-ex.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents c53a95d3c46d
children 4be1180a9e89
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
4 ;; SUMMARY: Site-specific setup for Hyperbole 4 ;; SUMMARY: Site-specific setup for Hyperbole
5 ;; USAGE: GNU Emacs Lisp Library 5 ;; USAGE: GNU Emacs Lisp Library
6 ;; KEYWORDS: hypermedia, local 6 ;; KEYWORDS: hypermedia, local
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner 8 ;; AUTHOR: Bob Weiner
9 ;; ORG: InfoDock Associates 9 ;; ORG: Brown U.
10 ;; 10 ;;
11 ;; ORIG-DATE: 15-Apr-91 at 00:48:49 11 ;; ORIG-DATE: 15-Apr-91 at 00:48:49
12 ;; LAST-MOD: 8-Mar-97 at 22:52:36 by Bob Weiner 12 ;; LAST-MOD: 3-Nov-95 at 22:51:43 by Bob Weiner
13 ;; 13 ;;
14 ;; This file is part of Hyperbole. 14 ;; This file is part of Hyperbole.
15 ;; Available for use and distribution under the same terms as GNU Emacs. 15 ;; Available for use and distribution under the same terms as GNU Emacs.
16 ;; 16 ;;
17 ;; Copyright (C) 1991-1997, Free Software Foundation, Inc. 17 ;; Copyright (C) 1991-1995, Free Software Foundation, Inc.
18 ;; Developed with support from Motorola Inc. 18 ;; Developed with support from Motorola Inc.
19 ;; 19 ;;
20 ;; DESCRIPTION: 20 ;; DESCRIPTION:
21 ;; 21 ;;
22 ;; See the "README" file for installation instructions. 22 ;; See the "README" file for installation instructions.
34 ;;; ************************************************************************ 34 ;;; ************************************************************************
35 ;;; Read the comments and modify as desired. 35 ;;; Read the comments and modify as desired.
36 ;;; ************************************************************************ 36 ;;; ************************************************************************
37 37
38 (message "Initializing Hyperbole, please wait...") 38 (message "Initializing Hyperbole, please wait...")
39
40 ;; The following line must not be deleted.
41 (require 'hyperbole)
42
43 ;;; ************************************************************************
44 ;;; TIMEZONE SETTING
45 ;;; ************************************************************************
46
47 ;; The following section applies only to MS-DOS and MS-Windows OSs.
48 ;; For such OSs, you must configure this section or you will receive
49 ;; an error when starting Hyperbole. Users of other OSs may simply
50 ;; ignore this section.
51
52
53 ;; Microcruft OSs don't provide an automatically set timezone environment
54 ;; variable. Nor do they include a UNIX-style date program. So follow
55 ;; the commented instructions in the code below here.
56
57 ;; If you happened to have installed a UNIX-style date program (when you type
58 ;; `date' at a shell, it simply spits out the date and time and then quits),
59 ;; you may comment out the logic.
60 ;;
61 (if (and hyperb:microcruft-os-p
62 (not (or (getenv "TZ") (getenv "TIMEZONE"))))
63 (progn
64 ;; Comment out the following `error' line...
65 (error "(hsite.el): Configure the TIMEZONE SETTING section in this file.")
66 ;; ... and uncomment the following line, substituting an appropriate
67 ;; timezone from the list in the variable, `htz:world-timezones'
68 ;; in the file, "htz.el".
69 ;; (setenv "TZ" "your-3char-timezone")
70 ))
71 39
72 ;;; ************************************************************************ 40 ;;; ************************************************************************
73 ;;; SMART SETTINGS 41 ;;; SMART SETTINGS
74 ;;; ************************************************************************ 42 ;;; ************************************************************************
75 43
93 61
94 ;;; ************************************************************************ 62 ;;; ************************************************************************
95 ;;; INTERNET SETTINGS 63 ;;; INTERNET SETTINGS
96 ;;; ************************************************************************ 64 ;;; ************************************************************************
97 65
98 ;; String to be used in the call: (hpath:rfc rfc-num) to create a remote 66 ;; String to be used in the call: (hpath:rfc rfc-num) to create an ange-ftp
99 ;; path to the RFC document for `rfc-num'. Uncomment and alter this setting 67 ;; path to the RFC document for 'rfc-num'. Uncomment and alter this setting
100 ;; if another site is closer for you. 68 ;; if another site is closer for you.
101 ;; (setq hpath:rfc "/anonymous@ds.internic.net:rfc/rfc%s.txt") 69 ;; (setq hpath:rfc "/anonymous@ds.internic.net:rfc/rfc%s.txt")
102 70
103 ;; When a user creates an explicit button, Hyperbole tries to store her 71 ;; When a user creates an explicit button, Hyperbole tries to store her
104 ;; Internet e-mail address with the button by using the formula, email-id = 72 ;; Internet e-mail address with the button by using the formula, email-id =
107 ;; hit {C-x C-e} after the closing paren of the following function, 75 ;; hit {C-x C-e} after the closing paren of the following function,
108 ;; (hypb:domain-name), you will see whether or not yours is configured 76 ;; (hypb:domain-name), you will see whether or not yours is configured
109 ;; properly. If it is not, uncomment the following line and set it to the 77 ;; properly. If it is not, uncomment the following line and set it to the
110 ;; proper value. 78 ;; proper value.
111 79
112 ;; (setenv "DOMAINNAME" "yourdomain.com") 80 ;; (setenv "DOMAINNAME" "mot.com")
113 81
114 ;;; ************************************************************************ 82 ;;; ************************************************************************
115 ;;; XEMACS, GNU EMACS 19, AND EPOCH CONFIGURATION 83 ;;; XEMACS, GNU EMACS 19, AND EPOCH CONFIGURATION
116 ;;; ************************************************************************ 84 ;;; ************************************************************************
117 85
204 ;;; requires some additional configuration before use. See the DESCRIPTION 172 ;;; requires some additional configuration before use. See the DESCRIPTION
205 ;;; section in "hib-doc-id.el" for complete installation and use information. 173 ;;; section in "hib-doc-id.el" for complete installation and use information.
206 ;;; 174 ;;;
207 (setq hibtypes:end-load-hook 175 (setq hibtypes:end-load-hook
208 (list (function (lambda () (mapcar 'require '(hib-doc-id)))))) 176 (list (function (lambda () (mapcar 'require '(hib-doc-id))))))
177
178 ;;; ************************************************************************
179 ;;; HYPERBOLE INITIALIZATION
180 ;;; ************************************************************************
181
182 ;;; This call loads the whole Hyperbole system.
183 ;;; You may want to look at this file just to see what it does.
184 ;;;
185 (require 'hinit)
186 ;;;
187 ;;; This call initializes the Hyperbole system for use.
188 ;;;
189 (hyperb:init)
209 190
210 ;;; ************************************************************************ 191 ;;; ************************************************************************
211 ;;; FILE VIEWER COMMAND SETTINGS 192 ;;; FILE VIEWER COMMAND SETTINGS
212 ;;; ************************************************************************ 193 ;;; ************************************************************************
213 194
235 (Info-find-node file "*" nil t)) 216 (Info-find-node file "*" nil t))
236 (error "Invalid file"))))))) 217 (error "Invalid file")))))))
237 )) 218 ))
238 "*Alist of (FILENAME-REGEXP . EDIT-FUNCTION) elements for calling special 219 "*Alist of (FILENAME-REGEXP . EDIT-FUNCTION) elements for calling special
239 functions to display particular file types within Emacs. See also 220 functions to display particular file types within Emacs. See also
240 `hpath:file-alist' for external display program settings.") 221 'hpath:file-alist' for external display program settings.")
241
242 (defvar hpath:display-buffer-alist
243 (list
244 (list 'this-window 'switch-to-buffer)
245 (list 'other-window (function (lambda (b)
246 (if (br-in-browser)
247 (progn (br-to-view-window)
248 (switch-to-buffer b))
249 (switch-to-buffer-other-window b)))))
250 (list 'one-window (function (lambda (b)
251 (if (br-in-browser) (br-quit))
252 (delete-other-windows)
253 (switch-to-buffer b))))
254 (list 'new-frame (function (lambda (b)
255 (select-frame (make-frame))
256 (switch-to-buffer b))))
257 (list 'other-frame 'hpath:display-buffer-other-frame)
258 (list 'other-frame-one-window
259 (function (lambda (b)
260 (hpath:display-buffer-other-frame b)
261 (delete-other-windows)))))
262 "*Alist of (DISPLAY-WHERE-SYMBOL DISPLAY-BUFFER-FUNCTION) elements.
263 This permits fine-grained control of where Hyperbole displays linked to buffers.
264 The default value of DISPLAY-WHERE-SYMBOL is given by `hpath:display-where'.
265 Valid DISPLAY-WHERE-SYMBOLs are:
266 this-window - display in the current window
267 other-window - display in another window in the current frame
268 one-window - display in the current window, deleting other windows
269 new-frame - display in a new frame
270 other-frame - display in another, possibly existing, frame
271 other-frame-one-window - display in another frame, deleting other windows.")
272
273 (defvar hpath:display-where 'other-window
274 "Symbol specifying the default method to use to display Hyperbole link referents.
275 See documentation of `hpath:display-where-alist' for valid values.")
276
277 (defvar hpath:display-where-alist
278 (list
279 (list 'this-window 'find-file)
280 (list 'other-window (function (lambda (f)
281 (if (br-in-browser)
282 (progn (br-to-view-window)
283 (find-file f))
284 (find-file-other-window f)))))
285 (list 'one-window (function (lambda (f)
286 (if (br-in-browser) (br-quit))
287 (delete-other-windows) (find-file f))))
288 (list 'new-frame 'find-file-new-frame)
289 (list 'other-frame 'hpath:find-other-frame)
290 (list 'other-frame-one-window
291 (function (lambda (f) (hpath:find-other-frame f) (delete-other-windows)))))
292 "*Alist of (DISPLAY-WHERE-SYMBOL DISPLAY-FILE-FUNCTION) elements.
293 This permits fine-grained control of where Hyperbole displays linked to files.
294 The default value of DISPLAY-WHERE-SYMBOL is given by `hpath:display-where'.
295 Valid DISPLAY-WHERE-SYMBOLs are:
296 this-window - display in the current window
297 other-window - display in another window in the current frame
298 one-window - display in the current window, deleting other windows
299 new-frame - display in a new frame
300 other-frame - display in another, possibly existing, frame
301 other-frame-one-window - display in another frame, deleting other windows.")
302 222
303 ;;; `hyperb:window-system' variable from "hversion.el" must be defined 223 ;;; `hyperb:window-system' variable from "hversion.el" must be defined
304 ;;; prior to this variable definition. 224 ;;; prior to this variable definition.
305 ;;; 225 ;;;
306 (defvar hpath:find-alist 226 (defvar hpath:find-alist
307 (let ((nextstep-suffixes '(("\\.\\(adaptor\\|app\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|e?ps\\|frame\\|gif\\|locus\\|Mesa\\|nib\\|project\\|rtf\\|sense\\|tiff\\|tree\\)$" . "open"))) 227 (let ((nextstep-suffixes '(("\\.\\(adaptor\\|app\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|e?ps\\|frame\\|gif\\|locus\\|Mesa\\|nib\\|project\\|rtf\\|sense\\|tiff\\|tree\\)$" . "open")))
308 (x-suffixes '(("\\.e?ps$" . "ghostview") 228 (x-suffixes '(("\\.e?ps$" . "ghostview")
309 ("\\.ps\\.g?[zZ]$" . "zcat %s | ghostview -") 229 ("\\.ps\\.g?[zZ]$" . "zcat %s | ghostview -")
310 ("\\.\\(gif\\|tiff?\\|xpm\\|xbm\\|pm\\|pbm\\|jpe?g\\)" . "xv") 230 ("\\.\\(gif\\|tiff?\\|xbm\\|pm\\|pbm\\|jpe?g\\)" . "xv")
311 ("\\.xwd$" . "xwud -noclick -in") 231 ("\\.xwd$" . "xwud -noclick -in")
312 ("\\.ra?s$" . "snapshot -l") 232 ("\\.ra?s$" . "snapshot -l")
313 ("\\.\\(fm\\|frame\\|mif\\)$" . 233 ("\\.xpm$" . "sxpm")
314 "frame.pl -vn -preader -c -f%s") ;; was "msgfm_driver" 234 ("\\.\\(fm\\|frame\\|mif\\)$" . "maker")
315 ("\\.\\(doc\\|boo\\)$" . "ileaf") 235 ("\\.\\(doc\\|boo\\)$" . "ileaf")
316 ))) 236 )))
317 (if (memq window-system '(dps ns)) 237 (if (memq window-system '(dps ns))
318 nextstep-suffixes 238 nextstep-suffixes
319 (cdr (assoc hyperb:window-system 239 (cdr (assoc hyperb:window-system
325 (cons "next" nextstep-suffixes) 245 (cons "next" nextstep-suffixes)
326 '("apollo" . nil) ; Display Manager 246 '("apollo" . nil) ; Display Manager
327 ))))) 247 )))))
328 "*Alist of (FILENAME-REGEXP . EDIT-PROGRAM) elements for using window system 248 "*Alist of (FILENAME-REGEXP . EDIT-PROGRAM) elements for using window system
329 dependent external programs to edit/display particular file types. See also 249 dependent external programs to edit/display particular file types. See also
330 `hpath:display-alist' for internal, window-system independent display 250 'hpath:display-alist' for internal, window-system independent display
331 settings.") 251 settings.")
332 252
333 ;;; ************************************************************************ 253 ;;; ************************************************************************
334 ;;; LINK PATH VARIABLE SUBSTITUTION SETTINGS 254 ;;; LINK PATH VARIABLE SUBSTITUTION SETTINGS
335 ;;; ************************************************************************ 255 ;;; ************************************************************************
347 '(hyperb:dir Info-directory Info-directory-list sm-directory load-path exec-path) 267 '(hyperb:dir Info-directory Info-directory-list sm-directory load-path exec-path)
348 "*List of Emacs Lisp variable symbols to substitute within matching link paths. 268 "*List of Emacs Lisp variable symbols to substitute within matching link paths.
349 Each variable value, if bound, must be either a pathname or a list of pathnames.") 269 Each variable value, if bound, must be either a pathname or a list of pathnames.")
350 270
351 ;;; ************************************************************************ 271 ;;; ************************************************************************
352 ;;; HYPERBOLE INITIALIZATION
353 ;;; ************************************************************************
354
355 ;;; This call loads the whole Hyperbole system.
356 ;;; You may want to look at this file just to see what it does.
357 ;;;
358 (require 'hinit)
359 ;;;
360 ;;; This call initializes the Hyperbole system for use.
361 ;;;
362 (hyperb:init)
363
364 ;;; ************************************************************************
365 ;;; HYPERBOLE LOCAL VARIABLE SUPPORT 272 ;;; HYPERBOLE LOCAL VARIABLE SUPPORT
366 ;;; ************************************************************************ 273 ;;; ************************************************************************
367 274
368 ;;; Uncomment this if you really need to be able to use Hyperbole variables 275 ;;; Uncomment this if you really need to be able to use Hyperbole variables
369 ;;; (and others with colons in their names) within file local variable lists. 276 ;;; (and others with colons in their names) within file local variable lists.