>>1
[m][i]Accessor
[i][/m] FDEFINITION[/m]
fdefinition accesses the current global function definition named by
function-name.
Special Operator FUNCTION
The value of
function is the functional value of
name in the
current lexical environment.
As you can see, the semantics are rather different.
There's also
symbol-function, btw, which accesses the symbol's function cell (although, it could be implemented as a separate namespace too, that's up to the implementors to decide).
Consider:
(flet (((setf a) (v) v)) (values (setf (a) 3) #'(setf a))) ;=>
3
#<FUNCTION (FLET (SETF A)) {24BBC085}>
(flet (((setf a) (v) v)) (values (setf (a) 3) (function (setf a)))) ;=>
3
#<FUNCTION (FLET (SETF A)) {24BFA85D}>
;;; #'... is just a reader macro which expands to (cl:function ...)
(flet (((setf a) (v) v)) (values (setf (a) 3) (fdefinition '(setf a)))) ;=>
The function (SETF A) is undefined.
[Condition of type UNDEFINED-FUNCTION]
...
;;; FDEFINITION does not work lexically, but it does work on global definitions:
(fdefinition '(setf fdefinition)) ;=> #<FUNCTION (SETF FDEFINITION)>