From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: More Guile 1.8 code failing in 2.x Date: Wed, 27 Feb 2013 16:13:31 +0100 Message-ID: <87r4k1u6w4.fsf@pobox.com> References: <1361959643.2097.179.camel@debian-box.lan> <87mwupao7n.fsf@markwitmer.com> <1361974971.2097.194.camel@debian-box.lan> <87zjypu73y.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361978023 10430 80.91.229.3 (27 Feb 2013 15:13:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 15:13:43 +0000 (UTC) Cc: mark@markwitmer.com, guile-user@gnu.org To: Richard Shann Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Feb 27 16:14:06 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UAihp-0007QI-F8 for guile-user@m.gmane.org; Wed, 27 Feb 2013 16:14:05 +0100 Original-Received: from localhost ([::1]:54324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAihU-0000Nq-GU for guile-user@m.gmane.org; Wed, 27 Feb 2013 10:13:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAihM-0000NR-Ji for guile-user@gnu.org; Wed, 27 Feb 2013 10:13:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAihL-00044C-Bb for guile-user@gnu.org; Wed, 27 Feb 2013 10:13:36 -0500 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:53923 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAihL-000447-63 for guile-user@gnu.org; Wed, 27 Feb 2013 10:13:35 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id EA7ADB9AC; Wed, 27 Feb 2013 10:13:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=2oCzv2OPZ3wTdZ5LZTopbAN7FFc=; b=vZuFly JkCnOZw+s+rmxUmjLXHvd7K2YMh8PlakGQo5isI6fsTxZv8nOICOxzLOIsnzCbX/ mJL7nqef8Dpr4eUaYd3Zzrh0rUCXG1/JR/IuxK5NqP2BFWzsCOWfDlmuuhVC6pQy 9p5Xx8MbNcMiGYszWLCaJ8GKo8jsUIiPFiAmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=hcpnZLVSK7oI4iRPHesQoWZM9eSfgliA 6PEWRT8N4BltMSiCa77hTQ+RGYG3Nc0e6Tw6afUjRn+15uD6VbN2XVOOakpGnNts Q3UNmdr9Gykj1BZZTALmoKvjvUO1/XUi2iL8qwLCohGySO5zAzYr7UKq/bOX2uXP 8MAiW8pS/FQ= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id E0C47B9AB; Wed, 27 Feb 2013 10:13:34 -0500 (EST) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 53F95B9AA; Wed, 27 Feb 2013 10:13:34 -0500 (EST) In-Reply-To: <87zjypu73y.fsf@pobox.com> (Andy Wingo's message of "Wed, 27 Feb 2013 16:08:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 40F39A5E-80F0-11E2-9BDE-79910E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10149 Archived-At: On Wed 27 Feb 2013 16:08, Andy Wingo writes: > Here is a Guile 2-compatible version: > > (cond-expand > (guile-2) ; nothing > (else ; guile < 2.0 > (define-macro (define-once sym exp) > `(define ,sym (if (module-locally-bound? ',sym) ,sym ,val))))) Sorry, thinko+typo. Should be: (cond-expand (guile-2) ; nothing (else ; guile < 2.0 (define-macro (define-once sym exp) `(define ,sym (if (module-locally-bound? (current-module) ',sym) ,sym ,exp))))) -- http://wingolog.org/