unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: guile-user@gnu.org
Subject: Re: [guile/scwm] 2nd argument problem to scm_definedp()
Date: 16 Sep 2002 21:42:01 +0200	[thread overview]
Message-ID: <87sn09lo1i.fsf@zagadka.ping.de> (raw)
In-Reply-To: <200209162049.54095.pieter.pareit@planetinternet.be>

P Pareit <pieter.pareit@planetinternet.be> writes:

> The c-code that modifies %load-path looks like creating %load-path
> in stead of adding strings to %load-path.

Can you show that code?

> I would first like to know if %load-path is 
> already defined, in scheme code this would be: (and (defined? %load-path) 
> (display "%load-path is defined") (newline)), it seems I cannot get the 
> argument for _current_lexical_environment_ right:

If you want to default an optional argument from C, use SCM_UNDEFINED:

  if (SCM_NFALSEP (scm_definedp (load_path_symbol, SCM_UNDEFINED)))
    ...

I guess you want the default.  If not, things get messy.  The lexical
environment that definedp expects is the data structure that gets
passed as the second argument to macro transformers.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


  reply	other threads:[~2002-09-16 19:42 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 [this message]
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
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=87sn09lo1i.fsf@zagadka.ping.de \
    --to=mvo@zagadka.ping.de \
    --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).