Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Collin Funk
On 3/11/24 5:37 AM, Bruno Haible wrote: > There is a pitfall with the list.join('\n') idiom: it's mainly designed for > non-empty lists. I therefore add the patch below. Ah, I see what you mean. I didn't even think of this case... Good catch. Thanks. Collin

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Bruno Haible
Hi Collin, > > - A function _eliminate_NMD_from_line that takes a single line as argument > > and return a line or None. > > - A function _eliminate_NMD that invokes _eliminate_NMD_from_line on each > > line of the snippet, and combines the results? > > I tried to implement it as you

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-11 Thread Collin Funk
Hi Bruno, I have attached two updated patches for 0003 and 0004. On 3/10/24 6:18 AM, Bruno Haible wrote: > In the function _eliminate_NMD, the list accumulation expressions are a bit > complex. Sorry, fixed. I am a big fan of Python's list comprehensions [1]. :) I will concede that they can get

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Collin Funk
Hi Bruno, > Also, please don't drop comments that are present in the original code, such > as: > > # Replace NMD, so as to remove redundant "$(MKDIR_P) '.'" invocations. > # The logic is similar to how we define gl_source_base_prefix. Sure. I remember seeing that comment in the shell script

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Bruno Haible
Hi Collin, Re 0003 (part 53): In the function _eliminate_NMD, the list accumulation expressions are a bit complex. Here, I feel, a better indentation is not even enough. Can you refactor this as follows: - A function _eliminate_NMD_from_line that takes a single line as argument and return a

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 53, 54.

2024-03-10 Thread Collin Funk
On 3/9/24 8:15 PM, Collin Funk wrote: > I don't remember those changes looking too hard, so _hopefully_ I can > get them done soon. The first two patches deal with the @NMD@ and @!NMD@ replacements. I used a mix of the test cases from my previous emails and the Emacs merge-gnulib script. All the o