[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] web-scheme & hart
From: |
Graham Fawcett |
Subject: |
Re: [Chicken-users] web-scheme & hart |
Date: |
Sat, 15 Mar 2008 15:05:25 -0400 |
On Sat, Mar 15, 2008 at 2:42 AM, Robin Lee Powell
<address@hidden> wrote:
> On Thu, Mar 06, 2008 at 09:37:42AM -0500, Graham Fawcett wrote:
> > Hope this helps. Comments and suggestions are always welcome.
>
> I'd really like a way to call my i18n code with a minimum of fuss.
> This led me to looking at the hart code and discovering:
>
> ;; Hart keyword syntax
> ;; Fixme -- I really want to make this user-extensible.
>
> Yes, I would like you to too! :) I would offer suggestions, but
> I've never used match-let.
Sure Robin, let's talk about this if/when the hi-level/low-level macro
stuff gets sorted out to your satisfaction.
> FwIW, though, all I really want is something like:
>
> (text: (foo ...))
>
> aliased as something nice and short:
>
> (f: ...)
Until I get custom tag support, you could try adding an (f:) clause to
hart-support.scm, e.g.:
((t: text:)
(hart-emit `(apply hart-print (map hart-html-escape
(list ,@body)))))
+ ((f:) (hart-parse-keyword-form `(text: (foo ,@body))))
Untested but should work. Here, (f: ...) is simply translated to
(text: (foo ...)) and then resubmitted for processing.
Note too that (t: ...) is an abbreviation for (text: ...). You can
tell from the snippet above how abbreviations can be specified.
Graham