aboutsummaryrefslogtreecommitdiffhomepage
path: root/coq/coq-mmm.el
blob: e8ff56eb46978474faecfb26f4c9d8bbcec65e95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
;; coq-mmm.el	  Configure MMM mode for CoqDoc elements
;;
;; Copyright     (C) 2007 David Aspinall
;; Authors:       David Aspinall <David.Aspinall@ed.ac.uk>
;; Licence:	 GPL
;;
;; $Id$
;;
;; We only spot some simple cases of embedded LaTeX/HTML/verbatim.
;;
;; At the moment, the insertion has a bad interaction with the holes
;; code which also uses skeletons: the interesting positions used
;; for MMM markup are made into holes!

(require 'mmm-auto)

(mmm-add-group
 'coq
 `((coq-text
   :submode text-mode
   :face mmm-comment-submode-face
   :front "(\\*\\*[ \t]"
   :back  "[ ]?\\*)"
   :insert ((?d coqdoc-text nil @ "(** " @ " " _ " " @ " *)" @)))

   (coq-latex
   :submode LaTeX-mode
   :face mmm-comment-submode-face
   :front "(\\*\\*[^%\\$]*[%\\$]"
   :back  "[%\\$][ \t]*\\*)"
   :insert ((?l coqdoc-latex nil @ "(** %" @ " " _ " " @ "% *)" @)))

   (coq-html
   :submode html-mode
   :face mmm-comment-submode-face
   :front "(\\*\\*[^#]*#"
   :back  "#[ \t]*\\*)"
   :insert ((?w coqdoc-html nil @ "(** #" @ " " _ " " @ "# *)" @)))

   (coq-verbatim
   :submode text-mode
   :face mmm-code-submode-face
   :front "^[ \t]*<<"
   :back  ">>"
   :insert ((?v coqdoc-verbatim nil @ "<<\n" @ " " _ " " @ "\n>>" @)))
   ))


(provide 'coq-mmm)

;;; coq-mmm.el ends here