[Mapserver-users] emacs mode for .MAP files

Hal Mueller hal at mobilegeographics.com
Mon May 24 01:05:52 PDT 2004


I've put together a fairly simple MapServer mode for the Emacs text 
editor.  I've been using the module for a few days now under GNU 
Emacs and it works pretty well.  Haven't tested under XEmacs, but I 
expect it would work fine there too.

You can download the mode at 
http://www.mobilegeographics.com/mapserver/mapserver-mode.el

The main thing this mode does is indentation.  Your code will be 
indented as you type it, or you can reindent/reformat an entire file 
at once.  It also does some keyword highlighting, but I rarely care 
about that myself so haven't worked that feature very much.

Known bug:
Constructs like the one below will add an extra indent level:
     PROJECTION "xxxx" "yyyy" "zzzz" END
         CLASS ....

Instead, use this style:
     PROJECTION
         "xxxx" "yyyy" "zzzz"
     END
     CLASS

(the problem arises for POINTS 1 1 END and anything similar).

I don't have this code checked into any CVS, so if you have 
mods/bugfixes, please email me directly.  If you have a MAP file that 
doesn't format correctly, please send me the file (and a comment 
about what doesn't work).  License for this Emacs mode is the same as 
the MapServer license (and _not_ the GPL).

Hal



More information about the MapServer-users mailing list