From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Paul D. Smith" Newsgroups: gmane.emacs.bugs Subject: Re: Makefile mode comment color didn't notice backslash continuation Date: 03 Feb 2003 15:48:27 -0500 Organization: GNU's Not Unix! Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: Reply-To: psmith@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044305370 20017 80.91.224.249 (3 Feb 2003 20:49:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 3 Feb 2003 20:49:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18fnWy-0005Cf-00 for ; Mon, 03 Feb 2003 21:49:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fnX6-0001Vz-03 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 03 Feb 2003 15:49:36 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18fnWt-0001Ii-00 for bug-gnu-emacs@prep.ai.mit.edu; Mon, 03 Feb 2003 15:49:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18fnWQ-0000aY-00 for bug-gnu-emacs@prep.ai.mit.edu; Mon, 03 Feb 2003 15:48:59 -0500 Original-Received: from chx400.switch.ch ([130.59.10.2]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fnWB-0008Cd-00 for bug-gnu-emacs@prep.ai.mit.edu; Mon, 03 Feb 2003 15:48:39 -0500 Original-Received: from zcars0m9.nortelnetworks.com ([47.129.242.157]) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 18fnW9-0000Wr-00 for gnu-emacs-bug@moderators.isc.org; Mon, 03 Feb 2003 21:48:37 +0100 Original-Received: from zcars2ky.ca.nortel.com (zcars2ky.ca.nortel.com [47.129.242.221])id h13KmXL18934 for ; Mon, 3 Feb 2003 15:48:33 -0500 (EST) Original-Received: from zcars0v6.ca.nortel.com (zcars0v6.ca.nortel.com [47.248.2.28]) h13KmSX05929 for ; Mon, 3 Feb 2003 15:48:28 -0500 (EST) Original-Received: (from news@localhost) by zcars0v6.ca.nortel.com (8.9.3+Sun/8.9.3) id PAA05989 for gnu-emacs-bug@moderators.isc.org; Mon, 3 Feb 2003 15:48:27 -0500 (EST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 35 Original-NNTP-Posting-Host: lemming.engeast.baynetworks.com Original-X-Trace: zcars0v6.ca.nortel.com 1044305307 5439 47.17.140.90 (3 Feb 2003 20:48:27 GMT) Original-X-Complaints-To: hawkinsj@nortelnetworks.com Original-NNTP-Posting-Date: Mon, 3 Feb 2003 20:48:27 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BadReturnPath: news@zcars0v6.ca.nortel.com rewritten as psmith@gnu.org using "Reply-To" header X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4379 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4379 %% Dan Jacobson 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 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