From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Problems with (defvar foo) and Emacs 23 Date: Sun, 01 Apr 2012 16:46:33 -0400 Message-ID: <14128.1333313193@alphaville> References: <87sjgngtzk.fsf@norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SERfe-00015D-Oj for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 16:46:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SERfd-0001MK-5r for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 16:46:42 -0400 In-Reply-To: Message from Bernt Hansen of "Sun, 01 Apr 2012 14:57:51 EDT." <87sjgngtzk.fsf@norang.ca> 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: Bernt Hansen Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org 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.