Based on wpdl-mode-el, a major mode for editing WPDL files by Scott Andrew Borton , which is an example used in a tutorial about Emacs mode creation. The tutorial can be found here: http://two-wugs.net/emacs/mode-tutorial.html