home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / hyperbole / hsite.el < prev    next >
Encoding:
Text File  |  1995-07-14  |  11.5 KB  |  281 lines

  1. ;;!emacs
  2. ;;
  3. ;; FILE:         hsite.el
  4. ;; SUMMARY:      Site-specific setup for Hyperbole
  5. ;; USAGE:        GNU Emacs Lisp Library
  6. ;; KEYWORDS:     hypermedia, local
  7. ;;
  8. ;; AUTHOR:       Bob Weiner
  9. ;; ORG:          Brown U.
  10. ;;
  11. ;; ORIG-DATE:    15-Apr-91 at 00:48:49
  12. ;; LAST-MOD:     13-Jul-95 at 17:32:08 by Bob Weiner
  13. ;;
  14. ;; This file is part of Hyperbole.
  15. ;; Available for use and distribution under the same terms as GNU Emacs.
  16. ;;
  17. ;; Copyright (C) 1991-1995, Free Software Foundation, Inc.
  18. ;; Developed with support from Motorola Inc.
  19. ;;
  20. ;; DESCRIPTION:  
  21. ;;
  22. ;;   See the "README" file for installation instructions.
  23. ;;
  24. ;;   "hsite.el" may be byte-compiled if you like but normally it is not.
  25. ;;
  26. ;;   Be sure to have users load any personal mail/news initializations
  27. ;;   before they load this file if any of Hyperbole's mail or news
  28. ;;   support features are enabled either herein or within their personal
  29. ;;   Hyperbole initializations.  Otherwise, the mail/news support may
  30. ;;   not be configured properly.
  31. ;;
  32. ;; DESCRIP-END.
  33.  
  34. ;;; ************************************************************************
  35. ;;; Read the comments and modify as desired.
  36. ;;; ************************************************************************
  37.  
  38. (message "Initializing Hyperbole, please wait...")
  39.  
  40. ;;; ************************************************************************
  41. ;;; SMART SCROLLING
  42. ;;; ************************************************************************
  43.  
  44. (defvar smart-scroll-proportional nil
  45.   "*Non-nil means Smart Keys should scroll relative to current line when pressed at the end of a line.
  46. Action Key moves current line to top of window.  Assist Key moves current
  47. line to bottom of window.  Repeated presses then scroll up or down a
  48. windowful.  Nil value instead ignores current line and always scrolls up or
  49. down a windowful.")
  50.  
  51. ;;; ************************************************************************
  52. ;;; HYPERBOLE DIRECTORY SETTING
  53. ;;; ************************************************************************
  54.  
  55. (require 'hyperbole)
  56.  
  57. ;;; ************************************************************************
  58. ;;; INTERNET SETTINGS
  59. ;;; ************************************************************************
  60.  
  61. ;; String to be used in the call: (hpath:rfc rfc-num) to create an ange-ftp
  62. ;; path to the RFC document for 'rfc-num'.  Uncomment and alter this setting
  63. ;; if another site is closer for you.
  64. ;; (setq hpath:rfc "/anonymous@ds.internic.net:rfc/rfc%s.txt")
  65.  
  66. ;; When a user creates an explicit button, Hyperbole tries to store her
  67. ;; Internet e-mail address with the button by using the formula, email-id =
  68. ;; <user-id>@<domainname>.  Not every system has its domainname set
  69. ;; up properly, however.  If you do a {M-x load-file hypb.elc RET} and then
  70. ;; hit {C-x C-e} after the closing paren of the following function,
  71. ;; (hypb:domain-name), you will see whether or not yours is configured
  72. ;; properly.  If it is not, uncomment the following line and set it to the
  73. ;; proper value.
  74.  
  75. ;; (setenv "DOMAINNAME" "mot.com")
  76.  
  77. ;;; ************************************************************************
  78. ;;; XEMACS, GNU EMACS 19, AND EPOCH CONFIGURATION
  79. ;;; ************************************************************************
  80.  
  81. ;; No-op unless set by one of the conditionals below.
  82. (defun hui:but-flash ())
  83.  
  84. (if (and hyperb:emacs19-p window-system)
  85.     (progn
  86.       (require 'hui-em19-b)
  87.       ;; Highlight explicit buttons whenever a file is read in.
  88.       (var:append 'find-file-hooks '(hproperty:but-create))
  89.       (fset 'hui:but-flash 'hproperty:but-flash)
  90.       ;;
  91.       ;; Substitute for the nil argument below a valid X color name with
  92.       ;; which to highlight buttons if the default highlighting does not
  93.       ;; appeal to you. See "hui-em19-b.el" for how this works.
  94.       (hproperty:cycle-but-color nil)
  95.       ;;
  96.       ;; Non-nil means visually emphasize that button under mouse cursor is
  97.       ;; selectable.
  98.       (setq hproperty:but-emphasize-p nil)
  99.       ;;
  100.       ;; If you find that the Hyperbole button flash time is too slow
  101.       ;; or too fast, adjust it here.
  102.       (setq hproperty:but-flash-time 1000)
  103.       ))
  104.  
  105. (if (and hyperb:lemacs-p (not noninteractive))
  106.     (progn
  107.       (require 'hui-xe-but)
  108.       ;;
  109.       ;; If running XEmacs 19.8 or below, don't highlight explicit buttons
  110.       ;; whenever a file is read in since this can cause a sporadic crash
  111.       ;; when find-files are done.
  112.       (if hyperb:kotl-p (var:append 'find-file-hooks '(hproperty:but-create)))
  113.       (fset 'hui:but-flash 'hproperty:but-flash)
  114.       ;;
  115.       ;; Substitute for the nil argument below a valid X color name with
  116.       ;; which to highlight buttons if the default highlighting does not
  117.       ;; appeal to you. See "hui-xe-but.el" for how this works.
  118.       (hproperty:cycle-but-color nil)
  119.       ;;
  120.       ;; Non-nil means visually emphasize that button under mouse cursor is
  121.       ;; selectable.
  122.       (setq hproperty:but-emphasize-p nil)
  123.       ;;
  124.       ;; If you find that the Hyperbole button flash time is too slow
  125.       ;; or too fast, adjust it here.
  126.       (setq hproperty:but-flash-time 1000)
  127.       ))
  128.  
  129. (if (and hyperb:epoch-p (string= hyperb:epoch-p "V4"))
  130.     (progn
  131.       (require 'hui-epV4-b)
  132.       ;; Highlight explicit buttons whenever a file is read in.
  133.       (var:append 'find-file-hooks '(hproperty:but-create))
  134.       (fset 'hui:but-flash 'hproperty:but-flash)
  135.       ;; Substitute for the nil argument below a valid X color name with
  136.       ;; which to highlight buttons if the default highlighting does not
  137.       ;; appeal to you. See "hui-epV4-b.el" for how this works.
  138.       (hproperty:cycle-but-color nil)
  139.       ;; If you use Epoch and find that the Hyperbole button flash time is
  140.       ;; too slow or too fast, adjust it here.
  141.       (defvar hproperty:but-flash-time 1000
  142.     "Machine specific value for empty loop counter, Epoch but flash delay.")
  143.       ))
  144.  
  145. ;;; ************************************************************************
  146. ;;; EXTERNAL SYSTEM ENCAPSULATIONS
  147. ;;; ************************************************************************
  148.  
  149. ;;; Support for encapsulations of any of these external systems may be
  150. ;;; enabled here.  You should be familiar with the external system before
  151. ;;; you try to use the Hyperbole support for it.
  152. ;;; Possible system encapsulations to include within the innermost set of
  153. ;;; parentheses are:
  154. ;;;   hsys-hbase hsys-wais hsys-w3
  155. ;;; See files with the same name, e.g. "hsys-w3.el" for details on each
  156. ;;; system.
  157. ;;;
  158. (setq hibtypes:begin-load-hook
  159.       (list (function (lambda () (mapcar 'require '())))))
  160.  
  161. ;;; ************************************************************************
  162. ;;; ONLINE LIBRARY CONFIGURATION
  163. ;;; ************************************************************************
  164.  
  165. ;;; Support for online library document id references is loaded here but
  166. ;;; requires some additional configuration before use.  See the DESCRIPTION
  167. ;;; section in "hib-doc-id.el" for complete installation and use information.
  168. ;;;
  169. (setq hibtypes:end-load-hook
  170.       (list (function (lambda () (mapcar 'require '(hib-doc-id))))))
  171.  
  172. ;;; ************************************************************************
  173. ;;; HYPERBOLE INITIALIZATION
  174. ;;; ************************************************************************
  175.  
  176. ;;; This call loads the whole Hyperbole system.
  177. ;;; You may want to look at this file just to see what it does.
  178. ;;;
  179. (require 'hinit)
  180. ;;;
  181. ;;; This call initializes the Hyperbole system for use.
  182. ;;;
  183. (hyperb:init)
  184.  
  185. ;;; ************************************************************************
  186. ;;; FILE VIEWER COMMAND SETTINGS
  187. ;;; ************************************************************************
  188.  
  189. (defvar hpath:display-alist
  190.   '(
  191.     ;; Run the OO-Browser on OOBR or OOBR-FTR Environment files.
  192.     ("OOBR\\(-FTR\\)?$" . br-env-browse)
  193.     ;; Display the top node from Info online manuals.
  194.     ("\\.info\\(-[0-9]+\\)?$\\|/info/[^.]+$\\|/info-local/[^.]+$"
  195.      . (lambda (file)
  196.      (if (string-match "-[0-9]+$" file)
  197.          ;; Removed numbered trailer to get basic filename.
  198.          (setq file (substring file 0 (match-beginning 0))))
  199.      (require 'info)
  200.      (condition-case ()
  201.          (Info-find-node file "Top" nil t)
  202.        (error (if (and file (file-exists-p file))
  203.               (progn
  204.             (kill-buffer "*info*")
  205.             (Info-find-node file "*" nil t))
  206.             (error "Invalid file"))))))
  207.     )
  208.   "*Alist of (FILENAME-REGEXP . EDIT-FUNCTION) elements for calling special
  209. functions to display particular file types within Emacs.  See also
  210. 'hpath:file-alist' for external display program settings.")
  211.  
  212. ;;; `hyperb:window-system' variable from "hversion.el" must be defined
  213. ;;; prior to this variable definition.
  214. ;;;
  215. (defvar hpath:find-alist
  216.   (let ((nextstep-suffixes '(("\\.\\(adaptor\\|app\\|bshlf\\|clr\\|concur\\|create\\|diagram\\|dp\\|e?ps\\|frame\\|gif\\|locus\\|Mesa\\|nib\\|project\\|rtf\\|sense\\|tiff\\|tree\\)$" . "open")))
  217.     (x-suffixes '(("\\.e?ps$" . "ghostview")
  218.               ("\\.ps\\.g?[zZ]$" . "zcat %s | ghostview -")
  219.               ("\\.\\(gif\\|tiff?\\|xbm\\|pm\\|pbm\\|jpe?g\\)"  . "xv")
  220.               ("\\.xwd$" . "xwud -noclick -in")
  221.               ("\\.ra?s$" . "snapshot -l")
  222.               ("\\.xpm$" . "sxpm")
  223.               ("\\.\\(fm\\|frame\\|mif\\)$" . "maker")
  224.               ("\\.\\(doc\\|boo\\)$" . "ileaf")
  225.               )))
  226.     (if (memq window-system '(dps ns))
  227.     nextstep-suffixes
  228.       (cdr (assoc hyperb:window-system
  229.           (list (cons "emacs19" x-suffixes)  ; GNU Emacs V19 under X
  230.             (cons "lemacs"  x-suffixes)  ; XEmacs under X
  231.             (cons "xterm"   x-suffixes)  ; GNU Emacs V18 under X
  232.             (cons "epoch"   x-suffixes)  ; UofI Epoch under X
  233.             '("sun"     . nil)       ; SunView
  234.             (cons "next" nextstep-suffixes)
  235.             '("apollo"  . nil)       ; Display Manager
  236.             )))))
  237.   "*Alist of (FILENAME-REGEXP . EDIT-PROGRAM) elements for using window system
  238. dependent external programs to edit/display particular file types.  See also
  239. 'hpath:display-alist' for internal, window-system independent display
  240. settings.")
  241.  
  242. ;;; ************************************************************************
  243. ;;; LINK PATH VARIABLE SUBSTITUTION SETTINGS
  244. ;;; ************************************************************************
  245.  
  246. ;;; The following variable permits sharing of links over wide areas, where
  247. ;;; links may contain variable references whose values may differ between
  248. ;;; link creator and link activator.
  249. ;;;
  250. ;;; When a link is created, if its path contains a match for any of the
  251. ;;; variable values in hpath:variables, then the variable's symbol is
  252. ;;; substituted for the literal value.  Hyperbole then replaces the variable
  253. ;;; with a matching value when the link is resolved.
  254. ;;;
  255. (defvar hpath:variables
  256.   '(hyperb:dir Info-directory Info-directory-list sm-directory load-path exec-path)
  257.   "*List of Emacs Lisp variable symbols to substitute within matching link paths.
  258. Each variable value, if bound, must be either a pathname or a list of pathnames.")
  259.  
  260. ;;; ************************************************************************
  261. ;;; HYPERBOLE LOCAL VARIABLE SUPPORT
  262. ;;; ************************************************************************
  263.  
  264. ;;; This may be removed if Hyperbole variables are never used in file local
  265. ;;; variable lists or if it causes a conflict with any local variable lists you
  266. ;;; use.  See the source file for more details.
  267. ;;;
  268. ;;  (require 'hlvar)
  269.  
  270. ;;; ************************************************************************
  271. ;;; SITE-SPECIFIC ADDITIONS - Add your Hyperbole configuration additions here.
  272. ;;; ************************************************************************
  273.  
  274. ;;; ************************************************************************
  275. ;;; END OF HYPERBOLE CONFIGURATION
  276. ;;; ************************************************************************
  277.  
  278. (provide 'hsite)
  279.  
  280. (message "Hyperbole is ready for action.")
  281.