Re: Emacs makefile mode - Commented text turns tab pink
Heime <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <SWCf6JdDQdZQRLrAOsHBPZ9xIZn7csxvCpKZlZjIBtEa054r39EDuMVt-CPfEv48Q0Y8l3wqQuKx-7xS5UXoIIQTX12fcQ0COUJZk5lTOrc=@protonmail.com> |
Sent with Proton Mail secure email. On Saturday, April 25th, 2026 at 4:32 AM, Heime <[email protected]> wrote: > > On Saturday, April 25th, 2026 at 3:15 AM, Eli Zaretskii <[email protected]> wrote: > > > > Date: Fri, 24 Apr 2026 15:06:07 +0000 > > > From: Heime <[email protected]> > > > > > > > > > I made a makefile with some comments. In Emacs the tab of the > > > comment turns pink. An I doing something wrong? > > > > > > $(trgdir)/antares.info: $(srcdir)/antares.texi > > > ## Make any missing parent directories > > > mkdir -p $(trgdir) > > > $(MAKEINFO) $(MAKEINFOFLAGS) -o $@ $< > > > > make-mode.el says: > > > > ;; Highlight shell comments that Make treats as commands, > > ;; since these can fool people. > > ("^\t+#" 0 makefile-space t) > > > > Make treats the comment "## Make any missing parent directories" > as a command? I realized Emacs is correct: make doesn't treat lines starting with # as comments - it passes them verbatim to the shell as commands, where the shell ignores them as comments. Is it design simplicity that has MAKE delegate to the shell? The introduction of a comment seems to be implemented in a very restricted way if comments were not handled by the shell.