GNU bug report logs - #37934
makefile colors messed up by ://

Previous Next

Package: emacs;

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

Date: Sat, 26 Oct 2019 14:07:02 UTC

Severity: normal

Tags: confirmed, patch

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

Found in version 26.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 37934 <at> debbugs.gnu.org
Subject: bug#37934: makefile colors messed up by ://
Date: Wed, 30 Oct 2019 12:12:00 +0100
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> $ cat makefile
> x:
> 	echo This line is the correct color.
> 	echo This line is not. Because it contains the string file:// in it.

I can confirm that this bug is still in Emacs.  The problem is this regexp:

(defvar makefile-dependency-regex
  ;; Allow for two nested levels $(v1:$(v2:$(v3:a=b)=c)=d)
  "^\\(\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#:=]\\)+?\\)\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ \t]*\\(.+\\)\\)?\\)"
  "Regex used to find dependency lines in a makefile.")

Of which I can only say...  "eek".

I wonder -- has anybody considered rewriting make-mode.el using
syntax-ppss?  Or is the syntax just too intractable for that?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 67 days ago.

Previous Next


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