"Set NAME's global function definition."
(declare (type function new-value) (optimize (safety 1)))
(let ((fdefn (fdefinition-object name t)))
- ;; *SETF-FDEFINITION-HOOK* won't be bound when initially running top-level
- ;; forms in the kernel core startup.
+ ;; *SETF-FDEFINITION-HOOK* won't be bound when initially running
+ ;; top level forms in the kernel core startup.
(when (boundp '*setf-fdefinition-hook*)
(dolist (f *setf-fdefinition-hook*)
(funcall f name new-value)))
(let ((fdefn (fdefinition-object name nil)))
(when fdefn
(fdefn-makunbound fdefn)))
+ (sb!kernel:undefine-fun-name name)
name)