bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14732: Package dos-mode for ELPA


From: Arni Magnusson
Subject: bug#14732: Package dos-mode for ELPA
Date: Mon, 5 Aug 2013 02:20:41 +0000 (GMT)
User-agent: Alpine 2.03 (LFD 1266 2009-07-14)

Hi Stefan,

Do you think that `dos-mode' could perhaps make it to Emacs core (i.e. lisp/progmodes) instead of becoming an optional ELPA download?

The current `bat-generic-mode' provides surprisingly limited syntax-highlighting, and earlier we discussed that instead of submitting a patch for the generic mode, it would be better if I rewrite it as a derived mode. While doing that, my design goal was to write a minimalistic replacement of `bat-generic-mode' with the following improvements:

- highlighting of more commands: at attrib color date dir doskey endlocal erase fc find mkdir more move popd pushd rmdir setlocal sort time title type xcopy

- highlighting of more control flow keywords: cmd defined else equ exit geq gtr in leq lss neq

- highlighting of called script: call foo

- highlighting of %%variable: for %%X in (bark meow) do echo %%X

- highlighting of defined variable: if defined VAR

I studied other code inside progmodes to use a similar style, both internally and in the user interface, which has a menu with a few basic but useful commands.

At 6333 bytes, I think it is a substantial improvement in Emacs support for Dos scripts. I believe it would make many Emacs users happy to have `auto-mode-alist' turn on `dos-mode' for the "bat" filename extension. Actually, the net increase in code should be less than 6333 bytes, because almost all remnants of `bat-generic-mode' could be deleted.

An analogous improvement was when `js-mode' replaced the old `javascript-generic-mode'.

I would of course be fine with `dos-mode' being an ELPA package (my initial proposal), but I just think Emacs should out-of-the-box have slightly better support for editing Dos scripts. They are an unpopular but necessary part of many free software projects, and developers would appreciate to at least see the common Dos keywords colored.

Perhaps ELPA could be a stepping stone towards the venerable progmodes? A kind of a review process and a general call for a SMIE patch? In that case, we should probably change the header comment "This file is part of GNU Emacs". Just to be explicit, I'm happy to have the Emacs developers make any changes to the proposed http://www.emacswiki.org/emacs/download/dos.el.

All the best,

Arni

P.S. I have received and signed the copyright assignment, and mailed it to the Assignment Administrator (D. Robertson) on 25 July.



On Sun, 4 Aug 2013, Stefan Monnier wrote:

[ Slowly going back over some of that email backlog. ]

http://www.emacswiki.org/emacs/download/dos.el

Thanks you. The code looks ready for ELPA (I'd use call-process a bit more often than shell-command, to avoid quoting issues, tho).

It would be nice to add some SMIE support to it.

However, to accept such changes into Emacs, you will need to do legal paperwork

Great. I have signed an FSF agreement regarding Texinfo, and I'm more than willing to do the same for Emacs.

Have you started this process? If not, then please fill the form below and email it as instructed so the FSF can send you the relevant paperwork to sign.


       Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]