From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?q?Germ=E1n_Arias?= Newsgroups: gmane.lisp.guile.user Subject: Help to TeXmacs with Guile 2 Date: Sat, 31 May 2014 22:16:46 -0600 Message-ID: Reply-To: germanandre@gmx.es NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Generated by Pantomime 1.2.0) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401596237 25683 80.91.229.3 (1 Jun 2014 04:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Jun 2014 04:17:17 +0000 (UTC) To: Guile Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 01 06:17:10 2014 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 1WqxCo-0003WA-Es for guile-user@m.gmane.org; Sun, 01 Jun 2014 06:17:10 +0200 Original-Received: from localhost ([::1]:33797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqxCn-0001m1-Vp for guile-user@m.gmane.org; Sun, 01 Jun 2014 00:17:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqxCZ-0001lo-Aj for guile-user@gnu.org; Sun, 01 Jun 2014 00:17:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqxCR-0006um-SF for guile-user@gnu.org; Sun, 01 Jun 2014 00:16:55 -0400 Original-Received: from mout.gmx.com ([74.208.4.201]:64695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqxCR-0006uh-Mf for guile-user@gnu.org; Sun, 01 Jun 2014 00:16:47 -0400 Original-Received: from localhost.localdomain ([190.56.98.23]) by mail.gmx.com (mrgmxus001) with ESMTPSA (Nemesis) id 0MPDqY-1WvN3G0RZg-004VEY for ; Sun, 01 Jun 2014 06:16:46 +0200 User-Agent: GNUMail (Version 1.2.1) X-Provags-ID: V03:K0:QeJox9KpY0WyQSn7mdmh+d27aDGPFrhzuTGdt1RIvSlKBhjFqaW DGMWXI9tgK8hDs86VFZAfZZad+LeY/zbMM30EasHl4787bwBPVPgHfFrqWQA2FE9Gz74tjS UKZyC7qu2F0EpG7V0JTQ4xNxKS6yW1a/gd6/8IicTgwbSvy81Ia/nplqFP6107yiAlJdFkV YCelKy3YVfY45gm/bMG9w== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 74.208.4.201 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:11280 Archived-At: Hi, I don't have experience with macros. But I get this error trying TeXmacs= with Guile 2.x: ERROR: Syntax error: ;;; kernel/boot/boot.scm:57:4: definition in expression context, where d= efinitions are not allowed, in form (define-syntax define-public-macro (= lambda (y) #f #((macro-type . defmacro) (defmacro-args args)) (syntax-ca= se y () ((_ . args) (let ((v (syntax->datum (syntax args)))) (datum->syn= tax y (apply (lambda (head . body) (quasiquote (define-public (unquote (= car head)) (procedure->memoizing-macro (lambda (cmd env) (apply (lambda = (unquote (cdr head)) (unquote-splicing body)) (cdr cmd))))))) v))))))) The offending code is: (if (guile-a?) (define-macro (define-public-macro head . body) `(define-public ,(car head) ;; FIXME: why can't we use procedure->macro ;; for a non-memoizing variant? (procedure->memoizing-macro (lambda (cmd env) (apply (lambda ,(cdr head) ,@body) (cdr cmd))))))) Any advice? Thanks. Germ=E1n.