bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37934: makefile colors messed up by ://


From: Lars Ingebrigtsen
Subject: bug#37934: makefile colors messed up by ://
Date: Wed, 30 Oct 2019 12:12:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

積丹尼 Dan Jacobson <jidanni@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]