;;; hoc-mode.el -- mode for editing NEURON hox files ;; (setq hoc-mode-keywords "proc\\|objref\\|create\\|public\\|begintemplate\\|endtemplate\\|access\\|if\\|for") (setq hoc-mode-highlights '( ( "proc\\|objref\\|create\\|public\\|begintemplate\\|endtemplate\\|access\\|if\\|for" . font-lock-keyword-face) ( "[a-z0-9A-Z_]+?[ \n\t]*\\((\\)" . font-lock-function-name-face) ( "//.+" . font-lock-comment-face) ( "/\*" . font-lock-comment-start-skip) ( "\*/" . font-lock-comment-end-skip) ) ) (define-derived-mode hoc-mode prog-mode "hoc" "Major mode for NEURON Hoc." (setq comment-start "//") (setq font-lock-defaults '(hoc-mode-highlights)) ) (provide 'hoc-mode) ;;; hoc-mode.el ends here