Subject: bug#44319: make mode should recognize ::= as a macro assignment

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 30 Oct 2020 13:52:20 +0100

Robert Lange <[email-masked]> writes:

> I've tested this on Emacs 26.1 on Debian, as well as a self-compiled
> 27.1. When I use the GNU immediate assignment operator `:=` the macro
> name ELC_FILES is correctly shown in font-lock in the macro color. But
> if I use the POSIX standard `::=` (well, forthcoming POSIX standard,
> but GNU emacs has supported it since v4.0) ELC_FILES is incorrectly
> shown in the target color.

Yup.  This bug is still present in Emacs 28.

> Looking in lisp/progmodes/make-mode.el, the const
> makefile-macroassign-regex is pretty gnarly, but I *think* it should
> match a `::=`, so I'm assuming it's getting preempted by something
> else, probably the const makefile-dependency-regex. Unfortunately,
> that regexp is a bit more than I can interpret, and I don't dare
> change it because I'll almost certainly break some other obscure but
> legal cases.

The bug seemed to be in makefile-match-dependency, which checked for
":=", but not for "::=", and I've now fixed this on the trunk.

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