[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error: Symbol's value as variable is void

From: Joe Corneli
Subject: Error: Symbol's value as variable is void
Date: Fri, 25 Mar 2005 12:28:38 -0600

I wrote some code that contains the following forms:

(defvar nero-link-regexp "\\[\\([0-9]+\\)\\]"
  "Regular expression that tells nero what links look like.
The first parenthesized subexpression is the unique string
denoting the webpage to load, which will sought among the

(defvar nero-font-lock-keywords
  (list `(,nero-link-regexp . font-lock-keyword-face)))
  "Font lock for `nero-mode'.
Currently, only numbered links are fontified.")

These work fine for me, but another person using the code reports the
following error upon byte-compiling:

Compiling file /stor/garray/src/nero.el at Fri Mar 25 08:21:48 2005
nero.el:295:33:Error: Symbol's value as variable is void: nero-link-regexp

I don't see any such error when I byte compile.  I'm just curious to
know if using `eval-when-compile' here is bad form, or what.  I think
I've seen it being used in other packages in a similar context, but I
don't understand it well enough to know whether I should be using it

Removing it did make the other user's error go away.  I told him to
create a bug report, but if its just the fault of my bad code, I'd
like to know.  More generally, as a point of style, when is it good to
use `eval-when-compile'?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]