[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: noob question on cl-flet.

From: Drew Adams
Subject: RE: noob question on cl-flet.
Date: Wed, 20 Apr 2016 08:50:33 -0700 (PDT)

> (cl-flet ((myfunc nil
>                   (message "i am in")))
>   (myfunc)
>   (princ (symbol-function 'myfunc)))
> Why symbol-function gives nil? My expectation is the function.

It returns nil because the symbol `myfunc' has an undefined function slot - it 
is not defined as a global function.

The binding created by `cl-flet' is not a binding of a Lisp (global) symbol.  
It is a local (let-like) lexical binding.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]