annotate lisp/oobr/br-clos.el @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 376386a54a3c
children 131b0175ea99
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;!emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; FILE: br-clos.el
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; SUMMARY: Support routines for CLOS inheritance browsing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; USAGE: GNU Emacs Lisp Library
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; KEYWORDS: lisp, oop, tools
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; AUTHOR: Bob Weiner
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
9 ;; ORG: InfoDock Associates
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; ORIG-DATE: 29-Jul-90
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
12 ;; LAST-MOD: 21-Feb-97 at 17:22:13 by Bob Weiner
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 0
diff changeset
14 ;; Copyright (C) 1990-1995, 1997 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; See the file BR-COPY for license information.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; This file is part of the OO-Browser.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; DESCRIPTION:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; Properly supports CLOS multiple inheritance.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; See 'clos-class-def-regexp' for regular expression that matches class
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;; definitions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;; DESCRIP-END.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; Other required Elisp libraries
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (require 'br-lib)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;; User visible variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (defvar clos-lib-search-dirs nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 "List of directories below which CLOS Library source files are found.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 Subdirectories of Library source are also searched. A Library is a stable
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 group of classes.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 (defvar clos-sys-search-dirs nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 "List of directories below which CLOS System source files are found.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 Subdirectories of System source are also searched. A System class is one
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 that is not yet reusable and is likely to change before release.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (defconst clos-narrow-view-to-class nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 "*Non-nil means narrow buffer to just the matching class definition when displayed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;;; Internal functions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (defun clos-get-classes-from-source (filename &optional skip-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 skip-tags-cleanup)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 "Scans FILENAME and returns cons of class list with parents-class alist.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 Handles multiple inheritance. Assumes file existence and readability have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 already been checked.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 With optional SKIP-TAGS non-nil, does not compute and store lookup tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 for element definitions. If SKIP-TAGS is nil, normally a cleanup
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 function is called after scanning the elements. SKIP-TAGS-CLEANUP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 non-nil suppresses this action."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (let ((no-kill (get-file-buffer filename))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 classes class parents parent-cons parent-list signatures)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 (if no-kill
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (set-buffer no-kill)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (funcall br-view-file-function filename))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (save-restriction
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (widen)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (goto-char (point-min))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (if skip-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (setq signatures (clos-scan-features))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (goto-char (point-min)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (while (re-search-forward clos-class-def-regexp nil t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 (setq class (buffer-substring (match-beginning 1) (match-end 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 parent-list nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 (while (looking-at clos-parent-regexp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (setq parent-list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (cons (buffer-substring
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 (match-beginning 1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 (match-end 1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 parent-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 (goto-char (match-end 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 (setq parent-list (nreverse parent-list))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 (if (and (null parent-list)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 (not (equal class "t")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 ;; All classes have t as an ancestor, so if
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 ;; no parents are listed, make t the sole parent.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (setq parent-list '("t")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 (setq parent-cons (cons parent-list class))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;; Don't have to check whether class-def pattern begins
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 ;; after a comment since the regexp used for matching
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 ;; precludes this.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (setq classes (cons class classes)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 parents (cons parent-cons parents)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (if skip-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 (clos-get-feature-tags
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 buffer-file-name (clos-sort-features signatures))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 (or skip-tags-cleanup (br-feature-tags-save)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 (or no-kill (kill-buffer (current-buffer)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 (cons classes (delq nil parents))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (defun clos-get-parents-from-source (filename class-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 "Scan source in FILENAME and return list of parents of CLASS-NAME.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 Assume file existence has already been checked."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (cond ((null class-name) nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 ((equal filename br-null-path)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 ;; This means there is no source for this class, so
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 ;; since all classes have t as an ancestor and there is no where
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 ;; to look for parents, make t the sole parent.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 '("t"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (t (car (car (br-rassoc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 class-name
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (cdr (clos-get-classes-from-source filename t))))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (defun clos-select-path (paths-htable-elt &optional feature-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 "Select proper pathname from PATHS-HTABLE-ELT based upon value of optional FEATURE-P.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 Selection is between path of class definition and path for features associated
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 with the class."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (let ((elt (cdr paths-htable-elt)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (if (consp elt)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (if feature-p (cdr elt) (car elt))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 ;; Both paths are the same.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 elt)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (defun clos-set-case (type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 "Return string TYPE identifier for use as a class name."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 type)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (defun clos-set-case-type (class-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 "Return string CLASS-NAME for use as a type identifier."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 class-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (defun clos-to-class-end ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 "Assuming point is at start of class, move to start of line after end of class."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 )
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (defun clos-to-comments-begin ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 "Skip back from current point past any preceding CLOS comments."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (let ((opoint))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (while
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (progn (setq opoint (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 ;; To previous line
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (if (= 0 (forward-line -1))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 ;; If begins with ";", then is a comment.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 ((looking-at "[ \t]*\\(;\\|$\\)"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (nil)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 (goto-char opoint)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 ;; Skip past whitespace
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (skip-chars-forward " \t\n")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (beginning-of-line)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 ;;; Internal variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 ;;; ************************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (defconst clos-class-keyword
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 "(defclass[ \t]+"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 "Keyword regexp preceding a clos class definition.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (defconst clos-class-name-before
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (concat "^[ \t]*" clos-class-keyword)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 "Regexp preceding the class name in a class definition.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (defconst clos-class-name-after
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 "[ \t\n]*\("
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 "Regexp following the class name in a class definition.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (defconst clos-identifier-chars "a-zA-Z0-9+*/_~!@$%^&=:<>{}|.-"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 "String of chars and char ranges that may be used within a CLOS identifier.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 (defconst clos-type-identifier-chars "][a-zA-Z0-9+*/_~!@$%^&=<>{}|.-"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 "String of chars and char ranges that may be used within a CLOS class name.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 No colons allowed.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 (defconst clos-identifier (concat "\\([" clos-identifier-chars "]+\\)")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 "Regular expression matching a CLOS identifier.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 (defconst clos-class-def-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 (concat clos-class-name-before clos-identifier clos-class-name-after)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 "Regular expression used to match to class definitions in source text.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190 Class name identifier is grouped expression 1. Parent class names
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 follow this expression, which terminates with the parenthesis that begins
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 the parent class group.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 (defconst clos-lang-prefix "clos-"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 "Prefix string that starts \"br-clos.el\" symbol names.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (defconst clos-parent-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 (concat "[ \t\n]*" clos-identifier)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 "Parent identifier is grouped expression 1.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (defconst clos-src-file-regexp ".\\.\\(lisp\\|lsp\\|cl\\|el\\)$"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 "Regular expression matching a unique part of CLOS source file names and no others.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (defvar clos-children-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 "Htable whose elements are of the form: (LIST-OF-CHILD-CLASSES . CLASS-NAME).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 Used to traverse CLOS inheritance graph. 'br-build-children-htable' builds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 this list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 (defvar clos-parents-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 "Htable whose elements are of the form: (LIST-OF-PARENT-CLASSES . CLASS-NAME).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 Used to traverse CLOS inheritance graph. 'br-build-parents-htable' builds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 this list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 (defvar clos-paths-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 "Htable whose elements are of the form: (LIST-OF-CLASS-NAMES . FILE-PATH).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 FILE-PATH gives the location of classes found in LIST-OF-CLASS-NAMES.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 'br-build-paths-htable' builds this list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 (defvar clos-lib-parents-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 "Htable whose elements are of the form: (LIST-OF-PARENT-CLASSES . CLASS-NAME).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 Only classes from stable software libraries are used to build the list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 (defvar clos-lib-paths-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 "Htable whose elements are of the form: (LIST-OF-CLASS-NAMES . FILE-PATH).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 FILE-PATH gives the location of classes found in LIST-OF-CLASS-NAMES.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 Only classes from stable software libraries are used to build the list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (defvar clos-sys-parents-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 "Htable whose elements are of the form: (LIST-OF-PARENT-CLASSES . CLASS-NAME).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 Only classes from systems that are likely to change are used to build the list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229 (defvar clos-sys-paths-htable nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 "Alist whose elements are of the form: (LIST-OF-CLASS-NAMES . FILE-PATH).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 FILE-PATH gives the location of classes found in LIST-OF-CLASS-NAMES.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 Only classes from systems that are likely to change are used to build the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233 list.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (defvar clos-lib-prev-search-dirs nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 "Used to check if 'clos-lib-classes-htable' must be regenerated.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 (defvar clos-sys-prev-search-dirs nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 "Used to check if 'clos-sys-classes-htable' must be regenerated.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
240 (defvar clos-env-spec nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 "Non-nil value means Environment specification has been given but not yet built.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 Nil means current Environment has been built, though it may still require updating.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 (provide 'br-clos)