From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: BT Templeton Newsgroups: gmane.emacs.devel Subject: Vlexical_binding is sometimes NULL Date: Mon, 23 Jul 2012 20:56:09 -0400 Message-ID: <87y5maf046.fsf@olor.terpri.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343091391 31570 80.91.229.3 (24 Jul 2012 00:56:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Jul 2012 00:56:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 24 02:56:31 2012 Return-path: Envelope-to: ged-emacs-devel@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 1StTQM-0002NR-Ma for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2012 02:56:30 +0200 Original-Received: from localhost ([::1]:53721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StTQM-0007Lu-0b for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2012 20:56:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StTQJ-0007Lo-Fl for emacs-devel@gnu.org; Mon, 23 Jul 2012 20:56:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StTQI-0005nb-Ha for emacs-devel@gnu.org; Mon, 23 Jul 2012 20:56:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StTQI-0005nX-Ao for emacs-devel@gnu.org; Mon, 23 Jul 2012 20:56:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1StTQF-0002GJ-Q8 for emacs-devel@gnu.org; Tue, 24 Jul 2012 02:56:23 +0200 Original-Received: from cpe-071-070-253-241.nc.res.rr.com ([71.70.253.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jul 2012 02:56:23 +0200 Original-Received: from bpt by cpe-071-070-253-241.nc.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jul 2012 02:56:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpe-071-070-253-241.nc.res.rr.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) Cancel-Lock: sha1:aX1nrglLzdRKr5F7Vsj2VrZv3nw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151839 Archived-At: The `Vlexical_binding' is sometimes NULL in a context where it can be accessed from Lisp code. For example, if I run `temacs -Q' (non-dumped Emacs) and evaluate `lexical-binding' in the scratch buffer, it evaluates to zero (NULL interpreted as a fixnum). This doesn't cause any obvious problems right now, but it may if the Lisp object representation changes; in Guile-Emacs it can cause segfaults, for example. For now I've fixed it with the trivial patch below, but would it be useful to add an initial-value argument to DEFVAR_LISP to prevent this kind of problem in the future? --- a/src/lread.c +++ b/src/lread.c @@ -4540,6 +4540,7 @@ with lexical binding. This variable is automatically set from the file variables of an interpreted Lisp file read using `load'. Unlike other file local variables, this must be set in the first line of a file. */); + Vlexical_binding = Qnil; Fmake_variable_buffer_local (Qlexical_binding); DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list, -- Inteligenta persono lernas la lingvon Esperanton rapide kaj facile. Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla, belsona, Esperanto estas la praktika solvo de la problemo de universala interkompreno. Lernu la interlingvon Esperanton!