From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: sending function arguments to recursive function calls Date: Sat, 04 May 2013 21:22:12 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367716960 29529 80.91.229.3 (5 May 2013 01:22:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 5 May 2013 01:22:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 05 03:22:39 2013 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 1UYnex-0005QR-6y for geh-help-gnu-emacs@m.gmane.org; Sun, 05 May 2013 03:22:39 +0200 Original-Received: from localhost ([::1]:53208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYnew-0008KC-Pw for geh-help-gnu-emacs@m.gmane.org; Sat, 04 May 2013 21:22:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYnel-0008K2-IJ for help-gnu-emacs@gnu.org; Sat, 04 May 2013 21:22:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYnek-00016D-MH for help-gnu-emacs@gnu.org; Sat, 04 May 2013 21:22:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:32853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYnek-000167-FW for help-gnu-emacs@gnu.org; Sat, 04 May 2013 21:22:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UYneh-0005Ha-Nq for help-gnu-emacs@gnu.org; Sun, 05 May 2013 03:22:23 +0200 Original-Received: from 76-10-164-69.dsl.teksavvy.com ([76.10.164.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 03:22:23 +0200 Original-Received: from monnier by 76-10-164-69.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 May 2013 03:22:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 76-10-164-69.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:TK+lzkTME0YucF/Sh5LBfzHJJHQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90478 Archived-At: > If I copy this function to *scratch* and evaluate the defun with C-x > C-e, I expect not to have broken anything. What happens instead is Reality is that there are 2 Emacs Lisps. One is the dynamically scoped Elisp, and the other is the lexically scoped Elisp. They are very similar, but they are two different languages. When evaluating code (e.g. with C-x C-e), Emacs has to "guess" which in Elisp this is supposedly written. It does that by checking the value of `lexical-binding' variable. In face-remap.el, this variable is set to t, whereas in *scratch* it is set to nil, so by moving the code from one buffer to the other, you asked Emacs to interpret this code in "the other Elisp". And this failed because the code you copied relies on behavior specific to lexical scoping (a lot of Elisp code doesn't care either way). Stefan