diff --git a/code/eval.lisp b/code/eval.lisp index 1e58da85bfc80e76c2348b4017cd161f429ce03c..6d1b95ef39dd0600fd78dd5184ec272f466fc34e 100644 --- a/code/eval.lisp +++ b/code/eval.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/eval.lisp,v 1.28 1998/12/19 16:00:39 dtc Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/eval.lisp,v 1.29 1999/01/09 11:10:30 dtc Exp $") ;;; ;;; ********************************************************************** ;;; @@ -179,11 +179,25 @@ :format-control "Wrong number of args to FUNCTION:~% ~S." :format-arguments (list exp))) (let ((name (second exp))) - (if (or (atom name) - (and (consp name) - (eq (car name) 'setf))) - (fdefinition name) - (eval:make-interpreted-function name)))) + (cond ((consp name) + (if (eq (car name) 'setf) + (fdefinition name) + (eval:make-interpreted-function name))) + ((macro-function name) + (error 'simple-type-error + :datum name + :expected-type '(not (satisfies macro-function)) + :format-control "~S is a macro." + :format-arguments (list name))) + ((special-operator-p name) + (error 'simple-type-error + :datum name + :expected-type '(not + (satisfies special-operator-p)) + :format-control "~S is a special operator." + :format-arguments (list name))) + (t + (fdefinition name))))) (quote (unless (= args 1) (error 'simple-program-error