Mercurial > hg > xemacs-beta
comparison lisp/oobr/br-start.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 4103f0995bd7 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
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: 25-Oct-95 at 01:38:41 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 It must end with a directory separator character.") | |
39 (if (stringp br-directory) | |
40 (setq br-directory (file-name-directory br-directory)) | |
41 (error | |
42 "(br-start.el): OO-Browser failed to set br-directory. Try setting it manually.")) | |
43 | |
44 (if (fboundp 'member) | |
45 (fset 'br-member 'member) | |
46 (defun br-member (elt list) | |
47 "Return non-nil if ELT is an element of LIST. Comparison done with 'equal'. | |
48 The value is actually the tail of LIST whose car is ELT." | |
49 (while (and list (not (equal (car list) elt))) | |
50 (setq list (cdr list))) | |
51 list)) | |
52 | |
53 ;;; ************************************************************************ | |
54 ;;; Other required Elisp libraries | |
55 ;;; ************************************************************************ | |
56 | |
57 ;; Add br-directory to load-path so other OO-Browser libraries can be found. | |
58 (or (br-member br-directory load-path) | |
59 (setq load-path (cons br-directory load-path))) | |
60 | |
61 (load "br-vers") | |
62 (mapcar 'require '(br-init br-site)) | |
63 | |
64 ;;; ************************************************************************ | |
65 ;;; Public functions | |
66 ;;; ************************************************************************ | |
67 | |
68 ;;; For backwards compatibility. | |
69 ;;;###autoload | |
70 (fset 'oobr 'oo-browser) | |
71 | |
72 ;;;###autoload | |
73 (defun oo-browser (&optional same-env-flag) | |
74 "Prompt for an Environment and language over which to run the OO-Browser. | |
75 Optional prefix argument SAME-ENV-FLAG means browse the current Environment, | |
76 if any, without prompting." | |
77 (interactive "P") | |
78 (if (and same-env-flag br-env-file br-lang-prefix) | |
79 (funcall (intern-soft (concat br-lang-prefix "browse"))) | |
80 (call-interactively 'br-env-browse))) | |
81 | |
82 (provide 'br-start) |