Changeset 14860


Ignore:
Timestamp:
09/04/16 07:01:07 (6 years ago)
Author:
Mark Evenson
Message:

[PATCH 2/5] Add EXTERNAL-ONLY option to APROPOS.
From ece4a944b77d91f657622adbef9d62cfbfb365b1 Mon Sep 17 00:00:00 2001
---

src/org/armedbear/lisp/apropos.lisp | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/apropos.lisp

    r12934 r14860  
    3535
    3636
    37 (defun apropos-list (string-designator &optional package-designator)
     37(defun apropos-list (string-designator &optional package-designator
     38                                                 external-only)
    3839  (if package-designator
    3940      (let ((package (find-package package-designator))
     
    4445          (when (search string (symbol-name symbol) :test #'char-equal)
    4546            (push symbol result)))
    46         (dolist (symbol (package-internal-symbols package))
    47           (declare (type symbol symbol))
    48           (when (search string (symbol-name symbol) :test #'char-equal)
    49             (push symbol result)))
     47        (unless external-only
     48          (dolist (symbol (package-internal-symbols package))
     49            (declare (type symbol symbol))
     50            (when (search string (symbol-name symbol) :test #'char-equal)
     51              (push symbol result))))
    5052        result)
    5153      (mapcan (lambda (package)
    52                 (apropos-list string-designator package))
     54                (apropos-list string-designator package external-only))
    5355              (list-all-packages))))
    5456
    55 (defun apropos (string-designator &optional package-designator)
     57(defun apropos (string-designator &optional package-designator external-only)
    5658  (dolist (symbol (remove-duplicates (apropos-list string-designator
    57                                                    package-designator)))
     59                                                   package-designator
     60                                                   external-only)))
    5861    (fresh-line)
    5962    (prin1 symbol)
Note: See TracChangeset for help on using the changeset viewer.