Simon Josefsson [2025-11-15 20:54 +0100] wrote:

> "Basil L. Contovounesios" <[email protected]> writes:
>
>>  # An ERE quoted for the shell, for matching a version+date line prefix.
>> -news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
>> +news-check-regexp ?= '^[\#*].* $(VERSION_REGEXP) \($(today)\)'
>>  
>>  # Like news-check-regexp, but as an unquoted BRE for .prev-version.
>> -news-check-regexp-prev ?= ^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)
>> +news-check-regexp-prev ?= ^[\#*].* $(PREV_VERSION_REGEXP) ([0-9-]*)
> ...
>>  # Keep consistent with news-check-regexp and news-check-regexp-prev.
>> -gl_noteworthy_news_ ?= * Noteworthy changes in release ?.? (????-??-??) [?]
>> +gl_noteworthy_news_ ?= \
>> +  $(if $(filter %.md,$(NEWS_file)),#,*) \
>> +  Noteworthy changes in release ?.? (????-??-??) [?]
>
> Per the last comment, these are now no longer in sync

How do you mean?  Both news-check-regexp and news-check-regexp-prev can
match either gl_noteworthy_news_ value by default (assuming the question
marks are filled in).

I added the comment just as a reminder, since any modification/override
of the default value of one of these variables is likely to need a
corresponding change in the other ones.

>                                                       -- but you don't
> need filter here, do you?  Doesn't it work to use a catch-all regexp
> here too?

gl_noteworthy_news_ is a literal placeholder, not a regexp - it is
inserted verbatim into the NEWS file post-release.  The # vs * logic
isn't essential (since the variable can easily be overriden), and
arguably * is valid in Markdown too (where it denotes a list item), but
I thought # might be a saner and more semantically distinct default for
starting a news section.

Thanks,
-- 
Basil

Reply via email to