Skip to content

Commit

Permalink
gestion des commentaires de doc
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
zoggy committed Dec 5, 2001
1 parent ee3fa28 commit 82d0262
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions emacs/caml-font.el
@@ -1,8 +1,9 @@
;; useful colors

(cond
((and (x-display-color-p)
(not (memq 'font-lock-type-face (face-list))))
((x-display-color-p)
;
; (not (memq 'font-lock-type-face (face-list))))
; make the necessary faces
(make-face 'Firebrick)
(set-face-foreground 'Firebrick "Firebrick")
Expand All @@ -18,14 +19,22 @@
(set-face-foreground 'DarkOliveGreen "DarkOliveGreen4")
(make-face 'CadetBlue)
(set-face-foreground 'CadetBlue "CadetBlue")
(make-face 'Stop)
(set-face-foreground 'Stop "White")
(set-face-background 'Stop "Red")
(make-face 'Doc)
(set-face-foreground 'Doc "Red")
; assign them as standard faces
(setq font-lock-comment-face 'Firebrick)
(setq font-lock-string-face 'RosyBrown)
(setq font-lock-keyword-face 'Purple)
(setq font-lock-function-name-face 'MidnightBlue)
(setq font-lock-variable-name-face 'DarkGoldenRod)
(setq font-lock-type-face 'DarkOliveGreen)
(setq font-lock-reference-face 'CadetBlue)))
(setq font-lock-reference-face 'CadetBlue)
(setq font-lock-stop-face 'Stop)
(setq font-lock-doccomment-face 'Doc)
))

; The same definition is in caml.el:
; we don't know in which order they will be loaded.
Expand All @@ -34,6 +43,12 @@

(defconst caml-font-lock-keywords
(list
;stop special comments
'("\\(^\\|[^\"]\\)\\((\\*\\*/\\*\\*)\\)"
2 font-lock-stop-face)
;doccomments
'("\\(^\\|[^\"]\\)\\((\\*\\*[^*]*\\([^)*][^*]*\\*+\\)*)\\)"
2 font-lock-doccomment-face)
;comments
'("\\(^\\|[^\"]\\)\\((\\*[^*]*\\*+\\([^)*][^*]*\\*+\\)*)\\)"
2 font-lock-comment-face)
Expand Down

0 comments on commit 82d0262

Please sign in to comment.