Commit c6d0484d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau 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)))))
(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 ""
:version ""
: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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment