From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Quesseveur Newsgroups: gmane.emacs.help Subject: Re: Questions about bat-generic-mode Date: Mon, 21 Jan 2013 11:18:08 +0100 Organization: Les Enchantements de Miraldra Message-ID: <868v7mkffj.fsf@free.fr> References: <86622vll9k.fsf@free.fr> <86libqjvmz.fsf@free.fr> Reply-To: pascal.quesseveur@free.fr NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358763617 1983 80.91.229.3 (21 Jan 2013 10:20:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jan 2013 10:20:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 21 11:20:36 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TxEUW-00006D-97 for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 11:20:36 +0100 Original-Received: from localhost ([::1]:59722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxEUD-00080f-1H for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jan 2013 05:20:17 -0500 X-Received: by 10.180.14.98 with SMTP id o2mr2505358wic.4.1358763492024; Mon, 21 Jan 2013 02:18:12 -0800 (PST) Original-Path: usenet.stanford.edu!m3no5208777wim.1!news-out.google.com!o9ni10957wio.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp5-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt) X-Attribution: PQsr Cancel-Lock: sha1:Fk9qc81s8WIWil+CBp+8OYoijJk= Original-Lines: 36 Original-NNTP-Posting-Date: 21 Jan 2013 11:18:11 CET Original-NNTP-Posting-Host: 78.241.156.15 Original-X-Trace: 1358763491 news-4.free.fr 2221 78.241.156.15:51003 Original-X-Complaints-To: abuse@proxad.net Original-Xref: usenet.stanford.edu gnu.emacs.help:196447 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88741 Archived-At: >"OG" == Oleksandr Gavenko writes: OG> 3 years ago I also have desire to make patch that provide OG> highlighting of '::' as comment syntax and want 'M-;' OG> (comment-dwim) be able uncomment such regions as I involved in OG> project with many batch files with such commenting style... One solution is to use file variables. Comments starting with :: are correctly processed by putting the following line at top of each batch file. :: -*-coding: iso-latin-1-dos; comment-start:"::" -*- Regarding the coding I observed that when using a dos encoding fontification doesn't work as expected: keywords set and goto are not fontified when they are at lines beginning. It comes from the regex: '("[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(:?\\sw+\\)?" I think it should be better to use [:space:]. OG> So stuck with bat-generic-mode. Feature that I like and which is OG> missing is an indentation for batch parentheses syntax: OG> if exist file.txt ( OG> echo xxx OG> ) else ( OG> echo yyy OG> ) +1 -- Pascal Quesseveur pascal.quesseveur@free.fr