;; look in ../share/emacs/20.3/etc/rgb.txt for more colors (hilit-set-mode-patterns 'tcl-mode '( ;; syntax errors ("[^ {\t$]\{" nil red) ("[\\] +$" nil red) ;; comments ("^\\([#].*$\\)" nil lightgreen) ("^[ \t]+\\([#].*$\\)" nil orange) ;; proc definitions ("^proc +.*$" nil green) ;; variables ("\\$\\{?[A-Za-z_0-9]+\\(\\}\\|\\>\\)" nil gray80) ;; I want evals before strings, keywords before evals, and strings ;; before keywords; I can't do all three, so I choose the following. ;; Evals inside strings won't change color as they should. ;; But it would be worse for keywords to change color inside strings, ;; or for keywords not to change color inside evals. ;; strings (hilit-string-find ?' moccasin) ;; key words ("\\<\\(append\\|array\\|break\\|case\\|catch\\|cd\\|close\\|concat\\|continue\\|default\\|else\\|error\\|eof\\|eval\\|exec\\|exit\\|expr\\|file\\|flush\\|for\\|foreach\\|format\\|gets\\|glob\\|global\\|history\\|if\\|incr\\|info\\|join\\|lappend\\|lindex\\|list\\|llength\\|lrange\\|lreplace\\|lsearch\\|lsort\\|open\\|puts\\|pwd\\|read\\|regexp\\|regsub\\|rename\\|return\\|scan\\|seek\\|set\\|source\\|split\\|string\\|switch\\|tell\\|time\\|trace\\|unknown\\|unset\\|uplevel\\|upvar\\|while\\)\\>" 0 cyan) ;; Objects/Class names ("\\<\\([A-Z][a-zA-Z0-9]+\\.?\\)+\\>" nil yellow) ;; evals ("\\([^\\\\]\\|^\\)\\[.*[^\\\\]\\]" nil SkyBlue) ("\\([^\\\\]\\|^\\)\\[" "[^\\\\]\\]" SkyBlue) ) ) ;;