projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a598ecf
)
Use EXTERNAL-ONLY for APROPOS and friends.
search
author
Olof-Joachim Frahm
<olof@macrolet.net>
Wed, 21 Aug 2013 18:05:14 +0000
(20:05 +0200)
committer
Olof-Joachim Frahm
<olof@macrolet.net>
Thu, 29 Aug 2013 10:48:41 +0000
(12:48 +0200)
src/documentation.lisp
patch
|
blob
|
history
diff --git
a/src/documentation.lisp
b/src/documentation.lisp
index
7efc1b0
..
5735e9e
100644
(file)
--- a/
src/documentation.lisp
+++ b/
src/documentation.lisp
@@
-2,25
+2,29
@@
;;; APROPOS and friends
;;; APROPOS and friends
-(defun map-apropos-symbols (function string package)
+(defun map-apropos-symbols (function string package external-only)
(flet ((handle-symbol (symbol)
;; TODO: it's implementation-dependent, though CHAR-EQUAL seems
;; more reasonable nevertheless
(when (search string (symbol-name symbol) :test #'char=)
(funcall function symbol))))
(if package
(flet ((handle-symbol (symbol)
;; TODO: it's implementation-dependent, though CHAR-EQUAL seems
;; more reasonable nevertheless
(when (search string (symbol-name symbol) :test #'char=)
(funcall function symbol))))
(if package
- (do-symbols (symbol package) (handle-symbol symbol))
- (do-all-symbols (symbol) (handle-symbol symbol)))))
+ (if external-only
+ (do-external-symbols (symbol package) (handle-symbol symbol))
+ (do-symbols (symbol package) (handle-symbol symbol)))
+ (if external-only
+ (do-all-external-symbols (symbol) (handle-symbol symbol))
+ (do-all-symbols (symbol) (handle-symbol symbol))))))
-(defun apropos-list (string &optional package)
+(defun apropos-list (string &optional package external-only)
(let (symbols)
(map-apropos-symbols
(lambda (symbol)
(pushnew symbol symbols :test #'eq))
(let (symbols)
(map-apropos-symbols
(lambda (symbol)
(pushnew symbol symbols :test #'eq))
- string package)
+ string package external-only)
symbols))
symbols))
-(defun apropos (string &optional package)
+(defun apropos (string &optional package external-only)
(map-apropos-symbols
(lambda (symbol)
(format t "~S" symbol)
(map-apropos-symbols
(lambda (symbol)
(format t "~S" symbol)
@@
-29,7
+33,7
@@
(when (fboundp symbol)
(format t " (fbound)"))
(terpri))
(when (fboundp symbol)
(format t " (fbound)"))
(terpri))
- string package))
+ string package external-only))
;;; DESCRIBE
;;; DESCRIBE