unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* variable defined in site-start.el not in .emacs or default.el
@ 2005-01-01 14:40 Steinar Bang
  2005-01-02 19:00 ` drkm
  0 siblings, 1 reply; 2+ messages in thread
From: Steinar Bang @ 2005-01-01 14:40 UTC (permalink / raw)


Platform: Intel Pentium M, debian sarge (testing/unstable)
	  emacs21 21.3+1-8

I'm defining a variable for the site-lisp directory in the
site-start.el file:

(defvar company-site-lisp (file-name-directory (locate-library "site-start"))
  "Path to the Company site-lisp directory.
The default value here is the location of the site-start.el file.")

The company-site-lisp variable seems to be defined when used elsewhere
in site-start.el.  But it is reported to be undefined when I'm
attempting to use it in ~/.emacs and the default.el file.

Also it isn't found when doing `C-h v' after startup.

I thought this would be a globally defined variable?  The variables
I'm defining with defcustom seems to be working.

Am I doing something wrong?

Thanx!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: variable defined in site-start.el not in .emacs or default.el
  2005-01-01 14:40 variable defined in site-start.el not in .emacs or default.el Steinar Bang
@ 2005-01-02 19:00 ` drkm
  0 siblings, 0 replies; 2+ messages in thread
From: drkm @ 2005-01-02 19:00 UTC (permalink / raw)


Steinar Bang <sb@dod.no> writes:

> (defvar company-site-lisp (file-name-directory (locate-library "site-start"))
>   "Path to the Company site-lisp directory.
> The default value here is the location of the site-start.el file.")

> The company-site-lisp variable seems to be defined when used elsewhere
> in site-start.el.  But it is reported to be undefined when I'm
> attempting to use it in ~/.emacs and the default.el file.

  It seems that .emacs and default.el are loaded before you define the
variable.  It's stange, because Emacs loads site-start.el, then
.emacs, then default.el.  Do you have something like (load "~/.emacs")
in your site-start.el ?

  What does say :

    ~> emacs -debug-init

if you put (error "Debugging error!") just before definning the
variable in site-start.el and just before using it in .emacs ?

> Also it isn't found when doing `C-h v' after startup.

> I thought this would be a globally defined variable?  The variables
> I'm defining with defcustom seems to be working.

  Do you mean that the problem disapears when you change `defvar' with
`defcustom'?  Strange!

--drkm

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-02 19:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-01 14:40 variable defined in site-start.el not in .emacs or default.el Steinar Bang
2005-01-02 19:00 ` drkm

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).