[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55035: [PATCH] biblio: Replace template interpreter with a macro (a
From: |
Ludovic Courtès |
Subject: |
bug#55035: [PATCH] biblio: Replace template interpreter with a macro (a "compiler"). |
Date: |
Thu, 05 May 2022 22:33:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Arun!
Arun Isaac <arunisaac@systemreboot.net> skribis:
>> diff --git a/src/guile/skribilo/biblio.scm
>> b/src/guile/skribilo/biblio.scm
>
> This file only has deletions. But maybe, update copyright header in this
> file as well? It would be nice if we had automated tests for unupdated
> copyright headers.
Ah, good question. I’d lean towards leaving copyright lines unchanged
when removing text, but I don’t know if there’s a preferred way.
>> + (define-syntax instantiate-body
>> + (lambda (s)
>> + (define (literal? id)
>> + (any (lambda (l)
>> + (and (identifier? id)
>> + (free-identifier=? id l)))
>
> We should avoid single letter names like `l'. :-)
I this particular case, the spelled-out name would be ‘literal’, but we
can’t use it because it’s a pattern variable. So… an exception. :-)
>> + (syntax-case s (literal ... or if G_)
>> + ((_ n str rest (... ...))
>
> And `n'.
This one yes; fixed!
>> diff --git a/tests/biblio.test b/tests/biblio.test
>> new file mode 100644
>> index 0000000..954d964
>> --- /dev/null
>> +++ b/tests/biblio.test
>> @@ -0,0 +1,88 @@
>> +;;; Exercise the `biblio' routines. -*- Scheme -*-
>> +;;;
>> +;;; Copyright (C) 2022 Ludovic Courtès <ludo@gnu.org>
>
> We should switch to the unicode copyright symbol ©, at least in new
> files.
Probably we should rewrite en bloc with a sed script.
We first need to reencode as UTF-8 and leftover Latin-1 files.
>> +(test-equal "bibliography-template, simple"
>
> The comma is slightly confusing. I'd go with "bibliography-template:
> simple" or "simple bibliography-template".
Done.
Pushed as 424bef0d0aac2a5a8607cf9f76a6def5ee0ca183!
Thanks, :-)
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#55035: [PATCH] biblio: Replace template interpreter with a macro (a "compiler").,
Ludovic Courtès <=