From 0a197195e87ffc5870d67d89edf33e618bc99b99 Mon Sep 17 00:00:00 2001 From: pmai <pmai> Date: Mon, 26 May 2003 14:30:06 +0000 Subject: [PATCH] Made bootfile work for old lisps which are still missing fdefn-or-lose. --- bootfiles/18e/boot12.lisp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bootfiles/18e/boot12.lisp b/bootfiles/18e/boot12.lisp index 70b14498e..3a663f6f7 100644 --- a/bootfiles/18e/boot12.lisp +++ b/bootfiles/18e/boot12.lisp @@ -9,12 +9,25 @@ ;;; ;;; Move FDEFN-OR-LOSE to KERNEL and export it from there. ;;; + +(in-package :lisp) + +(unless (fboundp 'fdefn-or-lose) +(defun fdefn-or-lose (name) + "Return the FDEFN of NAME. Signal an error if there is none + or if it's function is null." + (let ((fdefn (fdefinition-object name nil))) + (unless (and fdefn (fdefn-function fdefn)) + (error 'undefined-function :name name)) + fdefn))) + +(in-package :user) + (setf (fdefinition 'kernel::fdefn-or-lose) (fdefinition 'lisp::fdefn-or-lose)) (unintern 'cl::fdefn-or-lose :cl) (export 'kernel::fdefn-or-lose :kernel) - (in-package :profile) (defmacro defstruct! (name &rest stuff) -- GitLab