Added telml-mode
Getty Ritter
9 years ago
21 | 21 |
<a href="https://github.com/aisamanra/ndbl"><code>ndbl</code></a> configuration files.</li>
|
22 | 22 |
<li><code>pico-ml-mode</code> — minimal major mode for editing
|
23 | 23 |
<code>PicoML</code> source files.</li>
|
| 24 |
<li><code>telml-mode</code> — minimal major mode for editing
|
| 25 |
<a href="https://github.com/aisamanra/telml"><code>TeLML</code></a> markup files.</li>
|
24 | 26 |
</ul>
|
25 | 27 |
</div>
|
26 | 28 |
</body>
|
| 1 |
;; telml-mode.el --- a simple major mode for editing TeLML files.
|
| 2 |
|
| 3 |
;; Version: 20150904.0000
|
| 4 |
;; Author: Getty Ritter
|
| 5 |
;; Url: http://github.com/aisamanra/telml-mode
|
| 6 |
|
| 7 |
(setq telml-font-lock
|
| 8 |
'(( "\\<\\(em\\|link\\|ref\\|sidenote\\|strong\\)\\>"
|
| 9 |
. font-lock-variable-name-face )
|
| 10 |
( "[^\\\\]\\\\\\([A-Za-z_-]+\\)"
|
| 11 |
1 font-lock-variable-name-face )
|
| 12 |
( "{\\([^}]*[^\\\\]\\)}" 1 font-lock-string-face)
|
| 13 |
( "[^\\\\]\\(\\\\\\)[A-Za-z_-]+"
|
| 14 |
1 font-lock-builtin-face )
|
| 15 |
( "[^\\\\]\\([{}|]\\)" 1 font-lock-builtin-face )
|
| 16 |
))
|
| 17 |
|
| 18 |
|
| 19 |
(defvar telml-syntax-table nil "Syntax table for `telml-mode'.")
|
| 20 |
(setq telml-syntax-table
|
| 21 |
(let ((table (make-syntax-table)))
|
| 22 |
table))
|
| 23 |
|
| 24 |
(define-derived-mode telml-mode text-mode
|
| 25 |
"TeLML mode is a major mode for editing TeLML files"
|
| 26 |
:syntax-table telml-syntax-table
|
| 27 |
|
| 28 |
(setq font-lock-defaults '(telml-font-lock))
|
| 29 |
(setq mode-name "TeLML mode"))
|
| 30 |
|
| 31 |
(add-to-list 'auto-mode-alist '("\\.telml\\'" . telml-mode))
|
| 32 |
|
| 33 |
(provide 'telml-mode)
|
| 34 |
|
| 35 |
;;; telml-mode.el ends here
|