From: Bernt Hansen <bernt@norang.ca>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Problems with (defvar foo) and Emacs 23
Date: Sun, 01 Apr 2012 16:48:31 -0400 [thread overview]
Message-ID: <87k41zgov4.fsf@norang.ca> (raw)
In-Reply-To: <14128.1333313193@alphaville> (Nick Dokos's message of "Sun, 01 Apr 2012 16:46:33 -0400")
Nick Dokos <nicholas.dokos@hp.com> writes:
> Bernt Hansen <bernt@norang.ca> 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
next prev parent reply other threads:[~2012-04-01 20:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 18:57 Problems with (defvar foo) and Emacs 23 Bernt Hansen
2012-04-01 20:16 ` Achim Gratz
2012-04-01 20:29 ` [URGENT] " Achim Gratz
2012-04-02 6:15 ` Bastien
2012-04-01 20:37 ` Bastien
2012-04-01 21:18 ` Achim Gratz
2012-04-02 0:53 ` Nick Dokos
2012-04-02 5:31 ` Achim Gratz
2012-04-02 6:01 ` Nick Dokos
2012-04-02 8:21 ` Bastien
2012-04-02 6:28 ` Bastien
2012-04-02 6:27 ` Bastien
2012-04-02 18:11 ` Achim Gratz
2012-04-03 5:49 ` Bastien
2012-04-03 6:04 ` Achim Gratz
2012-04-04 7:25 ` Bastien
2012-04-02 6:12 ` Bastien
2012-04-07 12:15 ` Matt Lundin
2012-04-09 14:57 ` Bastien
2012-04-01 20:46 ` Nick Dokos
2012-04-01 20:48 ` Bernt Hansen [this message]
2012-04-02 6:09 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k41zgov4.fsf@norang.ca \
--to=bernt@norang.ca \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).