all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Paul D. Smith" <psmith@gnu.org>
Subject: Re: Makefile mode comment color didn't notice backslash continuation
Date: 03 Feb 2003 15:48:27 -0500	[thread overview]
Message-ID: <p5fzr5t7j8.fsf@lemming.engeast.baynetworks.com> (raw)
In-Reply-To: mailman.1311.1044140204.21513.bug-gnu-emacs@gnu.org

%% 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

       reply	other threads:[~2003-02-03 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1311.1044140204.21513.bug-gnu-emacs@gnu.org>
2003-02-03 20:48 ` Paul D. Smith [this message]
2003-02-04  1:00   ` Makefile mode comment color didn't notice backslash continuation Dan Jacobson
     [not found]   ` <mailman.1370.1044327576.21513.bug-gnu-emacs@gnu.org>
2003-02-04  4:16     ` Paul D. Smith
2003-02-04 16:14       ` Dan Jacobson
2003-02-06  5:24         ` Dan Jacobson
2003-02-04  7:36   ` Eli Zaretskii
     [not found] ` <mailman.1355.1044305370.21513.bug-gnu-emacs@gnu.org>
2003-02-13 19:46   ` Alexander Pohoyda
2003-02-01 20:38 Dan Jacobson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p5fzr5t7j8.fsf@lemming.engeast.baynetworks.com \
    --to=psmith@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.