unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
Cc: guile-user@gnu.org
Subject: Re: [guile/scwm] 2nd argument problem to scm_definedp()
Date: Mon, 16 Sep 2002 14:49:21 -0500	[thread overview]
Message-ID: <87y9a1ogu6.fsf@raven.i.defaultvalue.org> (raw)
In-Reply-To: <200209162049.54095.pieter.pareit@planetinternet.be> (P Pareit's message of "Mon, 16 Sep 2002 20:49:54 +0200")

P Pareit <pieter.pareit@planetinternet.be> 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


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  parent reply	other threads:[~2002-09-16 19:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16 18:49 [guile/scwm] 2nd argument problem to scm_definedp() P Pareit
2002-09-16 19:42 ` Marius Vollmer
2002-09-16 19:55   ` Rob Browning
2002-09-16 20:24     ` Marius Vollmer
2002-09-17  9:25     ` rm
2002-09-17 21:51       ` Marius Vollmer
2002-09-17  9:25   ` P Pareit
2002-09-17 13:53     ` P Pareit
2002-09-17 21:38       ` Marius Vollmer
2002-09-16 19:49 ` Rob Browning [this message]
2002-09-16 19:53   ` Rob Browning
2002-09-16 20:22     ` Marius Vollmer
2002-09-16 20:25       ` Rob Browning
2002-09-17 16:00       ` Rob Browning
2002-09-17 21:50         ` Marius Vollmer

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.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y9a1ogu6.fsf@raven.i.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=guile-user@gnu.org \
    /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.
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).