elisp - Simplest Emacs syntax highlighting tutorial? -


i create syntax highlighting minor mode emacs. have "writing gnu emacs extensions" o'reilly, not go depth of detail. there simple tutorial real or fake programming language highlighting mode?

thank you

defining custom generic mode best place start. can define basic syntax highlighting language following snippet.

(require 'generic-x)  (define-generic-mode    'my-mode                          ;; name of mode   '("//")                           ;; comments delimiter   '("function" "var" "return")      ;; keywords   '(("=" . 'font-lock-operator)      ("+" . 'font-lock-operator)     ;; operators     (";" . 'font-lock-builtin))     ;; built-in    '("\\.myext$")                    ;; files trigger mode    nil                              ;; other functions call   "my custom highlighting mode"     ;; doc string ) 

it's great defining basic syntax highlighting obscure languages. use log files in cases.


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -