unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: David Pirotte <david@altosw.be>
To: germanandre@gmx.es
Cc: Guile <guile-user@gnu.org>
Subject: Re: Help to TeXmacs with Guile 2
Date: Sun, 1 Jun 2014 14:54:13 -0300	[thread overview]
Message-ID: <20140601145413.066d6b3b@capac> (raw)
In-Reply-To: <b029d237d05842b655756e40d8bcd672@german-desktop>

Hello Germán,

> (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)))))))

For these guile version related code, I suggest something like this:

(cond-expand
  (guile-2
    ... ...)
  (else
    (define-macro (unless test . body)
      `(if (not ,test) (begin ,@body)))
      (export unless))))

Here is a real case example [which starts @ line 44]:

	http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gobject/utils.scm

Cheers,
David



  reply	other threads:[~2014-06-01 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01  4:16 Help to TeXmacs with Guile 2 Germán Arias
2014-06-01 17:54 ` David Pirotte [this message]
2014-06-02  5:14   ` Germán Arias
     [not found] <mailman.89.1401638430.28681.guile-user@gnu.org>
2014-06-01 16:58 ` Artyom Poptsov

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=20140601145413.066d6b3b@capac \
    --to=david@altosw.be \
    --cc=germanandre@gmx.es \
    --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).