ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.479 by mbaringer, Thu Apr 19 16:36:36 2007 UTC revision 1.480 by trittweiler, Thu May 10 17:54:31 2007 UTC
# Line 4187  The result is a list of property lists." Line 4187  The result is a list of property lists."
4187    (let ((package (if package    (let ((package (if package
4188                       (or (parse-package package)                       (or (parse-package package)
4189                           (error "No such package: ~S" package)))))                           (error "No such package: ~S" package)))))
4190        ;; The MAPCAN will filter all uninteresting symbols, i.e. those
4191        ;; who cannot be meaningfully described.
4192      (mapcan (listify #'briefly-describe-symbol-for-emacs)      (mapcan (listify #'briefly-describe-symbol-for-emacs)
4193              (sort (remove-duplicates              (sort (remove-duplicates
4194                     (apropos-symbols name external-only case-sensitive package))                     (apropos-symbols name external-only case-sensitive package))
# Line 4243  that symbols accessible in the current p Line 4245  that symbols accessible in the current p
4245                    (lambda (s) (check-type s string) t)                    (lambda (s) (check-type s string) t)
4246                    (compile nil (slime-nregex:regex-compile regex-string)))))))                    (compile nil (slime-nregex:regex-compile regex-string)))))))
4248  (defun apropos-matcher (string case-sensitive package external-only)  (defun make-regexp-matcher (string case-sensitive)
4249    (let* ((case-modifier (if case-sensitive #'string #'string-upcase))    (let* ((case-modifier (if case-sensitive #'string #'string-upcase))
4250           (regex (compiled-regex (funcall case-modifier string))))           (regex (compiled-regex (funcall case-modifier string))))
4251      (lambda (symbol)      (lambda (symbol)
4252        (and (not (keywordp symbol))        (funcall regex (funcall case-modifier symbol)))))
            (if package (eq (symbol-package symbol) package) t)  
            (if external-only (symbol-external-p symbol) t)  
            (funcall regex (funcall case-modifier symbol))))))  
4254  (defun apropos-symbols (string external-only case-sensitive package)  (defun apropos-symbols (string external-only case-sensitive package)
4255    (let ((result '())    (let ((packages (or package (remove (find-package :keyword)
4256          (matchp (apropos-matcher string case-sensitive package external-only)))                                        (list-all-packages))))
4257      (with-package-iterator (next (or package (list-all-packages))          (matcher  (make-apropos-matcher string case-sensitive))
4258                                   :external :internal)          (result))
4259        (loop      (with-package-iterator (next packages :external :internal)
4260         (multiple-value-bind (morep symbol) (next)        (loop (multiple-value-bind (morep symbol) (next)
4261           (cond ((not morep)                (cond ((not morep) (return))
4262                  (return))                      ((and (if external-only (symbol-external-p symbol) t)
4263                 ((funcall matchp symbol)                            (funcall matcher symbol))
4264                  (push symbol result))))))                       (push symbol result))))))
4265      result))      result))
4267  (defun call-with-describe-settings (fn)  (defun call-with-describe-settings (fn)

Removed from v.1.479  
changed lines
  Added in v.1.480

  ViewVC Help
Powered by ViewVC 1.1.5