GNU bug report logs - #76759
[PATCH] 31.0.50; makefile-mode: incorrectly highlights make-instructions as make targets

Previous Next

Package: emacs;

Reported by: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Date: Wed, 5 Mar 2025 09:34:02 UTC

Severity: normal

Tags: confirmed, patch

Merged with 17400, 33681, 33900, 35299, 36245, 37934, 45037, 46052, 46221, 48052

Found in version 26.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Cc: bug-gnu-emacs <at> gnu.org,
 "Ergus via Emacs development discussions." <emacs-devel <at> gnu.org>
Subject: Re: [PATCH] 31.0.50; makefile-mode: incorrectly highlights
 make-instructions as make targets
Date: Wed, 05 Mar 2025 12:54:41 +0100
[Message part 1 (text/plain, inline)]
Hi Jostein,

Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> 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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.