guile-user
[Top][All Lists]
Advanced

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

Re: [guile/scwm] 2nd argument problem to scm_definedp()


From: Rob Browning
Subject: Re: [guile/scwm] 2nd argument problem to scm_definedp()
Date: Mon, 16 Sep 2002 14:49:21 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-pc-linux-gnu)

P Pareit <address@hidden> writes:

> I would first like to know if %load-path is already defined

It should be.

In generally you usually just augment %load-path

  (set! %load-path (cons "foo" %load-path))

or

  (set! %load-path (append %load-path '("foo")))

You might also want to filter it or something.  I'd suspect the cases
where it would make sense to set it from scratch are extremely rare.

> (SCM_NFALSEP(scm_definedp(load_path_symbol,
> scm_interaction_environment()))) { /* print */ } or if
> (SCM_NFALSEP(scm_definedp(load_path_symbol, scm_current_module())))
> { /* print */ } give me both: ERROR: In procedure defined?: ERROR:
> Wrong type argument in position 2: #<directory (guile-user) 8084560>
> So what argument should I use?

I believe scm_definedp takes an environment as the second argument
rather than a module.  I'm not sure offhand how to get the environment
from a module, but I suspect this is it:

  scm_definedp (load_path_sym,
                scm_module_lookup_closure (scm_current_module));

I suspect Marius can correct me if I'm wrong.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD




reply via email to

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