projects
/
sbcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
69e6aef
)
Add EXTERNAL-ONLY to FIND-ALL-SYMBOLS.
external-only
author
Olof-Joachim Frahm
<olof@macrolet.net>
Thu, 29 Aug 2013 13:21:08 +0000
(15:21 +0200)
committer
Olof-Joachim Frahm
<olof@macrolet.net>
Wed, 23 Oct 2013 21:27:53 +0000
(23:27 +0200)
src/code/target-package.lisp
patch
|
blob
|
history
diff --git
a/src/code/target-package.lisp
b/src/code/target-package.lisp
index
7a06e73
..
c08de7c
100644
(file)
--- a/
src/code/target-package.lisp
+++ b/
src/code/target-package.lisp
@@
-1534,16
+1534,18
@@
PACKAGE."
(remove package (the list (package-%used-by-list p))))))
t)))
(remove package (the list (package-%used-by-list p))))))
t)))
-(defun find-all-symbols (string-or-symbol)
+(defun find-all-symbols (string-or-symbol &optional external-only)
#!+sb-doc
#!+sb-doc
- "Return a list of all symbols in the system having the specified name."
+ "Return a list of all symbols in the system having the specified name. If
+EXTERNAL-ONLY then only return external symbols."
(let ((string (string string-or-symbol))
(res ()))
(with-package-names (names)
(maphash (lambda (k v)
(declare (ignore k))
(multiple-value-bind (s w) (find-symbol string v)
(let ((string (string string-or-symbol))
(res ()))
(with-package-names (names)
(maphash (lambda (k v)
(declare (ignore k))
(multiple-value-bind (s w) (find-symbol string v)
- (when w (pushnew s res))))
+ (when (if external-only (eq w :external) w)
+ (pushnew s res))))
names))
res))
\f
names))
res))
\f