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 / oobr / br-start.el < prev    next >
Encoding:
Text File  |  1995-04-28  |  2.7 KB  |  77 lines

  1. ;;!emacs
  2. ;;
  3. ;; FILE:         br-start.el
  4. ;; SUMMARY:      Select language and invoke OO-Browser.
  5. ;; USAGE:        GNU Emacs Lisp Library
  6. ;; KEYWORDS:     oop, tools
  7. ;;
  8. ;; AUTHOR:       Bob Weiner
  9. ;; ORG:          Motorola Inc.
  10. ;;
  11. ;; ORIG-DATE:     5-Sep-92 at 23:31:03
  12. ;; LAST-MOD:     17-Apr-95 at 12:39:44 by Bob Weiner
  13. ;;
  14. ;; Copyright (C) 1992-19945 Free Software Foundation, Inc.
  15. ;; See the file BR-COPY for license information.
  16. ;;
  17. ;; This file is part of the OO-Browser.
  18. ;;
  19. ;; DESCRIPTION:  
  20. ;; DESCRIP-END.
  21.  
  22. ;;; ************************************************************************
  23. ;;; OO-Browser directory setting
  24. ;;; ************************************************************************
  25.  
  26. ;; Defines (hyperb:path-being-loaded), which is used below.
  27. ;; A Hyperbole directory, such as oobr/hypb, must either already be in
  28. ;; load-path or an explicit load of "hversion" must have been
  29. ;; done already or else the following line will fail to load hversion.
  30. ;; This is all documented in the OO-Browser installation instructions.
  31. (require 'hversion)
  32.  
  33. ;; Reinitialize br-directory on reload if initialization failed for any reason.
  34. (and (boundp 'br-directory) (null br-directory) (makunbound 'br-directory))
  35.  
  36. (defvar br-directory (hyperb:path-being-loaded)
  37.   "Directory where the OO-Browser executable code is kept.")
  38. (if (stringp br-directory)
  39.     (setq br-directory (file-name-directory br-directory))
  40.   (error
  41.    "(br-start.el): OO-Browser failed to set br-directory.  Try setting it manually."))
  42.  
  43. (if (fboundp 'member)
  44.     (fset 'br-member 'member)
  45.   (defun br-member (elt list)
  46.     "Return non-nil if ELT is an element of LIST.  Comparison done with 'equal'.
  47. The value is actually the tail of LIST whose car is ELT."
  48.     (while (and list (not (equal (car list) elt)))
  49.       (setq list (cdr list)))
  50.     list))
  51.  
  52. ;;; ************************************************************************
  53. ;;; Other required Elisp libraries
  54. ;;; ************************************************************************
  55.  
  56. ;; Add br-directory to load-path so other OO-Browser libraries can be found.
  57. (or (br-member br-directory load-path)
  58.     (setq load-path (cons br-directory load-path)))
  59.  
  60. (load "br-vers")
  61. (mapcar 'require '(br-init br-site))
  62.  
  63. ;;; ************************************************************************
  64. ;;; Public functions
  65. ;;; ************************************************************************
  66.  
  67. ;;;###autoload
  68. (defun oobr (&optional open-env-flag)
  69.   "Prompt for a language over which to run the OO-Browser.
  70. Optional prefix argument OPEN-ENV-FLAG prompts for an OO-Browser environment
  71. to open or for a new environment to be specified."
  72.   (interactive "P")
  73.   (funcall (intern-soft (concat (br-env-select-lang) "browse"))
  74.        open-env-flag))
  75.  
  76. (provide 'br-start)
  77.