guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#35790] [PATCH] scripts: lint: Separate the message warning text and


From: Christopher Baines
Subject: [bug#35790] [PATCH] scripts: lint: Separate the message warning text and data.
Date: Sat, 29 Jun 2019 09:46:44 +0100
User-agent: mu4e 1.2.0; emacs 26.2

Ludovic Courtès <address@hidden> writes:

> Hello,
>
> Christopher Baines <address@hidden> skribis:
>
>> +(define-syntax make-warning
>> +  (syntax-rules (G_)
>> +    ((_ package (G_ message) rest ...)
>> +     (%make-warning package message rest ...))
>> +    ((_ package message rest ...)
>> +     (%make-warning package message rest ...))))
>
> I think you can remove the second clause: that will ensure we never
> forget to add a G_ around messages.

Sure, there was one case where this clause was used, but I've switched
that to call %make-warning directly, and added a comment:

  (define (check-patch-file-names package)
    "Emit a warning if the patches requires by PACKAGE are badly named or if the
  patch could not be found."
    (guard (c ((message-condition? c)     ;raised by 'search-patch'
               (list
                ;; Use %make-warning, as condition-mesasge is already
                ;; translated.
                (%make-warning package (condition-message c)
                               #:field 'patch-file-names))))

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]