From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Problems with (defvar foo) and Emacs 23 Date: Sun, 01 Apr 2012 16:48:31 -0400 Message-ID: <87k41zgov4.fsf@norang.ca> References: <87sjgngtzk.fsf@norang.ca> <14128.1333313193@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SERhe-0001nh-NL for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 16:48:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SERhd-0001md-3X for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 16:48:46 -0400 In-Reply-To: <14128.1333313193@alphaville> (Nick Dokos's message of "Sun, 01 Apr 2012 16:46:33 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org Nick Dokos writes: > Bernt Hansen wrote: > >> Hi Bastien, >> >> I updated to master today e917477 ((org-xhtml.el): Removed, 2012-04-01) >> and am getting errors about org-clock-last-state not defined in my GNU >> Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-12-11 on >> raven, modified by Debian >> >> I can see the variable in the source defined as >> >> lisp/org-clock.el:(defvar org-clock-state) ;; dynamically scoped into this function >> >> but I don't get a variable definition with this code in emacs 23.2.1. >> >> If I change the definition to >> >> (defvar org-clock-state nil) >> >> then it works for me. >> >> There are _lots_ of these types of definitions with no value in the >> org-mode source. >> > > They are not supposed to *define* a variable. They are there to tell the > compiler not to worry. They are somewhat similar[fn:1] to extern declarations > in C code: whoever needs to use the variable says > > (defvar foo) > > There is (supposed to be) *one* place somewhere that actually defines > it: > > (defvar foo 1) > > Nick > > Footnotes: > > [fn:1] ...for some value of "similar". You have to take this with the > appropriately sized grain of salt. Ah, I had no idea how this was actually supposed to work :) Thanks for the clarification. I'll rewind to an older commit for now that works for me ... since I need it at work tomorrow. Thanks, Bernt