Skip to content

Commit

Permalink
Call (SETF FDEFINITION) rather than the equivalent environment function.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-strandh committed Sep 27, 2020
1 parent aa1649e commit 33aac44
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Code/Data-and-control-flow-Clostrum/defun-support.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
(make-instance 'sicl-environment:simple-function-description
:lambda list ',lambda-list))))
(eval-when (:load-toplevel :execute)
(let* ((,env-var (sicl-environment:global-environment))
(,client-var (sicl-environment:client ,env-var)))
(setf (sicl-environment:fdefinition
,client-var ,env-var ',name)
(lambda ,lambda-list
,@declarations
,@(if (null documentation)
'()
(list documentation))
(block ,(if (symbolp name) name (second name))
,@forms))))
(setf (fdefinition ',name)
(lambda ,lambda-list
,@declarations
,@(if (null documentation)
'()
(list documentation))
(block ,(if (symbolp name) name (second name))
,@forms)))
',name)))))

0 comments on commit 33aac44

Please sign in to comment.