How to write an emacs mode for a new language?

吃可爱长大的小学妹 提交于 2019-11-27 05:07:53

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/91201/how-to-write-an-emacs-mode-for-a-new-language

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!