unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Dale Mellor <guile-qf1qmg@rdmp.org>
To: guile-user@gnu.org
Subject: Help: equivalent syntax-case to defmacro
Date: Tue, 05 May 2020 18:34:25 +0100	[thread overview]
Message-ID: <caa251a11a68d2196c09cbaee4094f6ca7c096ca.camel@rdmp.org> (raw)

Been struggling with this for a while, and nothing I try works.

In test-suite/tests/getopt-long there is

     (defmacro deferr (name-frag re)
        (let ((name (symbol-append 'exception: name-frag)))
           `(define ,name (cons 'quit ,re))))

     (deferr no-such-option "no such option")
     (display exception:no-such-option)

and I would like to know how the equivalent with define-syntax... syntax-case would look.

Thanks,
Dale





             reply	other threads:[~2020-05-05 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 17:34 Dale Mellor [this message]
2020-05-06 15:49 ` Help: equivalent syntax-case to defmacro Taylan Kammer

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=caa251a11a68d2196c09cbaee4094f6ca7c096ca.camel@rdmp.org \
    --to=guile-qf1qmg@rdmp.org \
    --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).