From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Can't M-x compile-defun `edebug' because dynamic variables are falsely taken as lexical. Date: Wed, 4 Jan 2017 22:02:43 +0000 Message-ID: <20170104220243.GC2052@acm.fritz.box> References: <20170103141444.GA4649@acm.fritz.box> <20170103213228.GB2085@acm.fritz.box> <20170104133948.GA7373@acm.fritz.box> <20170104200458.GA2052@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483567423 19955 195.159.176.226 (4 Jan 2017 22:03:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2017 22:03:43 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 04 23:03:39 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOtek-0004Xo-9h for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2017 23:03:38 +0100 Original-Received: from localhost ([::1]:42419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOteo-0002YG-8j for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2017 17:03:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOteC-0002XE-6p for emacs-devel@gnu.org; Wed, 04 Jan 2017 17:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOte9-0006tw-3v for emacs-devel@gnu.org; Wed, 04 Jan 2017 17:03:04 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:39459 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1cOte8-0006td-Td for emacs-devel@gnu.org; Wed, 04 Jan 2017 17:03:01 -0500 Original-Received: (qmail 61560 invoked by uid 3782); 4 Jan 2017 22:02:58 -0000 Original-Received: from acm.muc.de (p548C6D63.dip0.t-ipconnect.de [84.140.109.99]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 04 Jan 2017 23:02:57 +0100 Original-Received: (qmail 2144 invoked by uid 1000); 4 Jan 2017 22:02:43 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211114 Archived-At: Hello, Stefan. On Wed, Jan 04, 2017 at 04:49:15PM -0500, Stefan Monnier wrote: > > special-variable-p would appear to be a near useless function, since it > > doesn't do what it's name says. > It's useful for the compiler, but it's mostly internal, indeed. OK. > > There appears to be no way of checking whether a variable's binding is > > (or will be) lexical. > In which context do you need/want to do that (I ask because how to do > it (and even if it can be done) depends on the details)? I honestly don't know. I presume that there will be code (other than the byte compiler) which will want to make a distinction. Maybe there's not. After (defvar foo), the byte compiler seems able to handle foo as a dynamic variable. I'm still trying to figure out how, given that that flag denoting a special variable in the struct symbol doesn't get set. I'm just thoroughly confused about the whole business of whether (defvar foo) creates a special variable or not. At the moment, I'm not even quite sure any more exactly what a special variable is. I knew this morning. :-( > Stefan -- Alan Mackenzie (Nuremberg, Germany).