Commit c6d0484d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

1.0.0.3: add package-function to find function in package

parent 1d9bda2c
......@@ -238,11 +238,18 @@ outputs a tag plus a list of variable and their values, returns the last value"
(,f "~{~S~^ ~}~%" (setf ,res (multiple-value-list ,x)))))
exprs)
(apply 'values ,res)))))
(defun package-function (package name)
(let* ((p (find-package package))
(s (find-symbol* name p nil)))
(and s
(eq (symbol-package s) p)
(fboundp s)
(not (macro-function s))
(fdefinition s))))
(defun package-functions (package-designator)
(loop :with p = (find-package package-designator)
:for s :being :each :present-symbol :of p
:when (and (eq p (symbol-package s))
(fboundp s) (not (macro-function s)))
:when (package-function p s)
:collect s))
(defun trace-package-functions (package-designator)
(eval `(trace ,@(package-functions package-designator))))
......
;;; -*- Mode: Lisp ; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
(defsystem "fare-utils"
:version "1.0.0.2"
:version "1.0.0.3"
:description "Basic functions and macros, interfaces, pure and stateful datastructures"
:long-description "fare-utils is a small collection of utilities.
It contains a lot of basic everyday functions and macros"
......
......@@ -118,6 +118,7 @@
;; #:parse-body
#:parse-defsetf-lambda-list
#:identifierp
#:package-function
#:package-functions
#:trace-package-functions
#:untrace-package-functions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment