How to write an emacs mode for a new language?

EmacsMode

Emacs Problem Overview


I would like to write an Emacs major mode for a 4GL. Can someone show me a tutorial? As far as I googled I was able to find only this broken:

link http://two-wugs.net/emacs/mode-tutorial.html</a>

Emacs Solutions


Solution 1 - Emacs

If you're lazy, one easy way is to extend generic-mode to know about your new language:

<http://emacswiki.org/emacs/GenericMode>

I do this a lot for config files for applications that I work with a lot to get decent syntax highlighting. Here's one I did for the asterisk PBX a long time ago as an example.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPrabuView Question on Stackoverflow
Solution 1 - EmacsbmdhacksView Answer on Stackoverflow