unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pascal Quesseveur <pascal.quesseveur@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Questions about bat-generic-mode
Date: Mon, 21 Jan 2013 11:18:08 +0100	[thread overview]
Message-ID: <868v7mkffj.fsf@free.fr> (raw)
In-Reply-To: mailman.17972.1358712041.855.help-gnu-emacs@gnu.org

>"OG" == Oleksandr Gavenko <gavenkoa@gmail.com> 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


  parent reply	other threads:[~2013-01-21 10:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 18:25 Questions about bat-generic-mode Pascal Quesseveur
2013-01-17 20:58 ` Oleksandr Gavenko
     [not found] ` <mailman.17754.1358458783.855.help-gnu-emacs@gnu.org>
2013-01-18 16:36   ` Pascal Quesseveur
2013-01-20 20:00     ` Oleksandr Gavenko
     [not found]     ` <mailman.17972.1358712041.855.help-gnu-emacs@gnu.org>
2013-01-21 10:18       ` Pascal Quesseveur [this message]
2013-01-21 10:40         ` Pascal Quesseveur

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=868v7mkffj.fsf@free.fr \
    --to=pascal.quesseveur@free.fr \
    --cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).