X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Finfo-functions.lisp;h=d763505a4fe408c836324c40891da9f2dfb94d4a;hb=b83353d9f998e5c0e34604b5593df70c66d2c510;hp=d4cb02ac9dc2218190aafa67e863b2c6c210cae7;hpb=e5b4fe643472dff0ea751fd7ac55fcba0fd0f4f9;p=sbcl.git diff --git a/src/compiler/info-functions.lisp b/src/compiler/info-functions.lisp index d4cb02a..d763505 100644 --- a/src/compiler/info-functions.lisp +++ b/src/compiler/info-functions.lisp @@ -85,9 +85,10 @@ ;;; can't assume that they aren't just naming a function (SETF FOO) ;;; for the heck of it. NAME is already known to be well-formed. (defun note-if-setf-fun-and-macro (name) - (when (consp name) - (when (or (info :setf :inverse name) - (info :setf :expander name)) + (when (and (consp name) + (eq (car name) 'setf)) + (when (or (info :setf :inverse (second name)) + (info :setf :expander (second name))) (compiler-style-warn "defining as a SETF function a name that already has a SETF macro:~ ~% ~S" @@ -106,6 +107,7 @@ (frob :where-from :assumed) (frob :inlinep) (frob :kind) + (frob :macro-function) (frob :inline-expansion-designator) (frob :source-transform) (frob :structure-accessor) @@ -141,14 +143,11 @@ only." (declare (symbol symbol)) (let* ((fenv (when env (lexenv-funs env))) (local-def (cdr (assoc symbol fenv)))) - (cond (local-def - (if (and (consp local-def) (eq (car local-def) 'macro)) - (cdr local-def) - nil)) - ((eq (info :function :kind symbol) :macro) - (values (info :function :macro-function symbol))) - (t - nil)))) + (if local-def + (if (and (consp local-def) (eq (car local-def) 'macro)) + (cdr local-def) + nil) + (values (info :function :macro-function symbol))))) (defun (setf sb!xc:macro-function) (function symbol &optional environment) (declare (symbol symbol) (type function function))