Subject: Re: [bug#35790] [PATCH] scripts: lint: Separate the message warning text and data.

From: Christopher Baines <[email-masked]>
Date: Sat, 29 Jun 2019 09:46:44 +0100

Ludovic Courtès <[email-masked]> writes:

> Hello,
>
> Christopher Baines <[email-masked]> 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))))