From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: noob question on cl-flet. Date: Wed, 20 Apr 2016 08:50:33 -0700 (PDT) Message-ID: <5d30fc0b-52bf-4cde-baba-2e2235e7c197@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461167473 32694 80.91.229.3 (20 Apr 2016 15:51:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2016 15:51:13 +0000 (UTC) To: Shiyao Ma , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 20 17:51:02 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1asuP7-0000WY-J8 for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 17:51:01 +0200 Original-Received: from localhost ([::1]:51749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asuP7-0001Kd-4a for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 11:51:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asuOr-0001CS-Cw for help-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:50:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asuOl-0000TM-V8 for help-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:50:45 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:29878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asuOl-0000S6-FK for help-gnu-emacs@gnu.org; Wed, 20 Apr 2016 11:50:39 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3KFoZ0c029266 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Apr 2016 15:50:36 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u3KFoZpJ006002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 Apr 2016 15:50:35 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u3KFoXVH010856; Wed, 20 Apr 2016 15:50:33 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109797 Archived-At: > (cl-flet ((myfunc nil > (message "i am in"))) > (myfunc) > (princ (symbol-function 'myfunc))) >=20 > 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.