all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* 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.
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.