;; Generic mode for the Edinburgh Concurrency Workbench ;; Very basic mode, with some syntax highlighting. ;; Author: Paolo Baldan (require 'generic-x) ;; operators color (define-generic-mode 'cwb-mode ;; name of the mode ;; comments delimiter '("*") ;; keywords '("agent" "set") '(;; operators (not font locked by default ("=" . 'font-lock-operator-face) ;; names of processes ("agent *\\([[:alnum:]]*\\)" 1 'font-lock-function-name-face) ;; constants ( "\\<0\\>\\|\\" . 'font-lock-constant-face) ;; some operators highlighted - same as constants ( "\\\\\\|+\\||\\|'\\|\\.\\|\\[\\|\\]" . 'font-lock-constant-face) ;; name of label sets ("set *\\([[:alnum:]]*\\)" 1 'font-lock-type-face) ;; outputs are highlighted ("'\\([[:alnum:]]*\\)" 1 'font-lock-variable-name-face) (";" . 'font-lock-builtin-face)) ;; a built-in '("\\.cwb$") ;; files that trigger this mode (set-face-attribute 'font-lock-variable-name-face nil :overline t) ;; any other functions to call "Mode for Edimburgh concurrency workbench" ;; doc string )