[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Makefile mode comment color didn't notice backslash continuation
From: |
Paul D. Smith |
Subject: |
Re: Makefile mode comment color didn't notice backslash continuation |
Date: |
03 Feb 2003 15:48:27 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
%% Dan Jacobson <jidanni@dman.ddts.net> writes:
dj> Gentlenerds, Makefile mode has blown it by making comment_B appear in
dj> command color when in fact it is a comment just like comment_A:
dj> $ cat Makefile
dj> a:
dj> echo hello # comment_A \
dj> comment_B
Personally I believe this is wrong as well, but suggest a different
solution: none of this text should be colorized as a comment.
In makefile mode, makefile comments should be colored as comments and
other text which is not makefile comments should not be.
In the above example _none_ of that text is a makefile comment, because
the entirety of any line beginning with a TAB is considered a command
script, and make does not do any comment processing on command script
lines (it can't, actually).
It may or may not be interpreted as a shell comment, once make invokes
the shell (assuming you don't set SHELL to something else)... neither
make nor makefile-mode in Emacs can know that.
In short (too late...) the font-locking in makefile mode should ignore
everything except make variables for colorization in a line that begins
with a TAB (that's what make does, after all...)
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Re: Makefile mode comment color didn't notice backslash continuation, Alexander Pohoyda, 2003/02/13