From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: `pp-eval-expression' behaves strangely under lexical binding Date: Sun, 17 Apr 2016 19:42:18 +0200 Message-ID: <87ega4t9mt.fsf@mbork.pl> References: <87pototkq5.fsf@mbork.pl> <87mvostie1.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460914970 18804 80.91.229.3 (17 Apr 2016 17:42:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Apr 2016 17:42:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 17 19:42:39 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 1arqiU-0001iD-4q for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Apr 2016 19:42:38 +0200 Original-Received: from localhost ([::1]:49561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arqiT-0001ZO-K9 for geh-help-gnu-emacs@m.gmane.org; Sun, 17 Apr 2016 13:42:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arqiI-0001XR-0w for help-gnu-emacs@gnu.org; Sun, 17 Apr 2016 13:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arqiE-0006YC-1y for help-gnu-emacs@gnu.org; Sun, 17 Apr 2016 13:42:25 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:46650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arqiD-0006Xs-Oz for help-gnu-emacs@gnu.org; Sun, 17 Apr 2016 13:42:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 361AAAC6D4E; Sun, 17 Apr 2016 19:42:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dej9ykFMr0b8; Sun, 17 Apr 2016 19:42:18 +0200 (CEST) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 720EEAC6D4D; Sun, 17 Apr 2016 19:42:18 +0200 (CEST) User-agent: mu4e 0.9.13; emacs 25.1.50.8 In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:5e00:2:52::8 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:109783 Archived-At: On 2016-04-17, at 16:15, Stefan Monnier wrote: >> But isn't my question still valid for `symbol-value'? > > No, whether it's implemented in C or in Lisp is irrelevant. As soon as > you put a symbol into a `quote`, it can't be a reference to a lexical > variable any more because the compiler will treat it as data and data > cannot refer to lexical variables, only to other data. > > Dynamically scoped variables are data, on the other hand (they're just > a particular field of a symbol object, which is a kind of "struct"). Stefan, thanks for your answer. I'm not entirely sure I understand it, but I'm going to give it some thinking, and if it is still unclear, I'll get back here. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University