From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.user Subject: Re: [guile/scwm] 2nd argument problem to scm_definedp() Date: Mon, 16 Sep 2002 14:49:21 -0500 Sender: guile-user-admin@gnu.org Message-ID: <87y9a1ogu6.fsf@raven.i.defaultvalue.org> References: <200209162049.54095.pieter.pareit@planetinternet.be> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032205796 31200 127.0.0.1 (16 Sep 2002 19:49:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Sep 2002 19:49:56 +0000 (UTC) Cc: guile-user@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17r1sY-000871-00 for ; Mon, 16 Sep 2002 21:49:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17r1so-0004qr-00; Mon, 16 Sep 2002 15:50:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17r1s5-0004nL-00 for guile-user@gnu.org; Mon, 16 Sep 2002 15:49:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17r1s3-0004n9-00 for guile-user@gnu.org; Mon, 16 Sep 2002 15:49:25 -0400 Original-Received: from n66644228.ipcdsl.net ([66.64.4.228] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17r1s3-0004mJ-00 for guile-user@gnu.org; Mon, 16 Sep 2002 15:49:23 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 7FDD71CF0; Mon, 16 Sep 2002 14:49:22 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 98C2F5DD; Mon, 16 Sep 2002 14:49:21 -0500 (CDT) Original-To: P Pareit In-Reply-To: <200209162049.54095.pieter.pareit@planetinternet.be> (P Pareit's message of "Mon, 16 Sep 2002 20:49:54 +0200") Original-Lines: 38 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-pc-linux-gnu) Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:992 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:992 P Pareit 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: # > 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