GNU bug report logs - #33247
makefile mode comment color

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sat, 3 Nov 2018 03:41:02 UTC

Severity: minor

Merged with 9407, 24380

Full log


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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 33247 <at> debbugs.gnu.org,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Subject: Re: bug#33247: makefile mode comment color
Date: Tue, 06 Nov 2018 08:25:39 -0500
> Why do we have this setting for makefiles at all?

That's to handle the /bin/sh comments on the command lines of rules,
where the code is run by /bin/sh and hence obeys the corresponding
rules.  E.g.

   foo.o: foo.c
   	echo This is#not a comment
   	$(CC) $(CFLAGS) -o $@ $<  #This is an sh comment

> Are there any such
> restrictions on comments in Makefiles?  Stefan?

Maybe we should conditionalize on the presence of a leading TAB at the
beginning of the line.

BTW, I recently saw that the above is wrong in cases like

   foo.o: foo.c
   	@#An sh comment not recognized by current makefile mode
   	$(CC) $(CFLAGS) -o $@ $<  #This is a comment

so if you can fix both of those while you're there, that'd be great!


-- Stefan




This bug report was last modified 6 years and 221 days ago.

Previous Next


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