Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 25 lines (22 sloc) 0.916 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
;; This file contains useful things for participating to batteries
;; Right now, this consists of
;; * colorizing specially test comments (in orange)
;;
;; To use this file, simply add the following line to your .emacs:
;; (load-file "path/to/batteries/batteries_dev.el")
;;

(defface test-comment-face
  '((t :foreground "orangered3"))
  "face for test comments")

(add-hook 'tuareg-mode-hook
          '(lambda ()
             (defun tuareg-font-lock-syntactic-face-function (state)
               (if (nth 3 state) font-lock-string-face
                 (let ((start (nth 8 state)))
                   (save-excursion
                     (goto-char start)
                     (if (looking-at-p "(\\*\\$[QTRE=]")
                         'test-comment-face
                       (if (looking-at-p "(\\*\\*[^*]")
                           tuareg-doc-face
                         font-lock-comment-face))))))))
Something went wrong with that request. Please try again.