Subject: Re: [PATCH] 31.0.50; makefile-mode: incorrectly highlights make-instructions as make targets

From: "Dr. Arne Babenhauserheide" <[email-masked]>
Date: Wed, 05 Mar 2025 12:54:41 +0100

Hi Jostein,

Jostein Kjønigsen <[email-masked]> writes:

> A common pattern used in this regex is "[^\n$#]" (with slight variations), which (from how I read regexps) aims to match anything which is not a
> lineshift, a $-sign or a #-sign.
>
> "Anything" in this case would then also include whitespace, which IMO is the source of the bug.
>
> I've tried changing this part of the statement in parts of the regex to "[^\n\s$#]", like in the attached patch. Ie also exclude leading whitespace.
> From what I've tested, it does not seem to have any adverse effects, although I may not have tested all areas affected by this change.

From the Makefile format, I think this should not be leading whitespace,
but only leading tabs. Leading spaces in rules are a syntax error.

Can you check whether \t instead of \s also works?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de