Permalink
Browse files

add some other peoples elips

  • Loading branch information...
1 parent 0634d1f commit 43e95bde0020e748bef89a5c15c052c826fcfb6b @jrockway committed Apr 9, 2008
Showing with 14,362 additions and 0 deletions.
  1. +1,588 −0 git.el
  2. +9,622 −0 js2-20080330.el
  3. +28 −0 ocaml/caml-compat.el
  4. +125 −0 ocaml/caml-font.el
  5. +57 −0 ocaml/caml-hilit.el
  6. +1,659 −0 ocaml/caml.el
  7. +767 −0 ocaml/camldebug.el
  8. +20 −0 ocaml/index-fr.html
  9. +20 −0 ocaml/index.html
  10. +94 −0 ocaml/inf-caml.el
  11. +373 −0 ocaml/ocaml.el
  12. +9 −0 ocaml/ocaml.emacs
View
1,588 git.el

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,28 @@
+;; function definitions for old versions of emacs
+
+;; indent-line-to
+
+(if (not (fboundp 'indent-line-to))
+ (defun indent-line-to (column)
+ "Indent current line to COLUMN.
+
+This function removes or adds spaces and tabs at beginning of line
+only if necessary. It leaves point at end of indentation."
+ (if (= (current-indentation) column)
+ (back-to-indentation)
+ (beginning-of-line 1)
+ (delete-horizontal-space)
+ (indent-to column))))
+
+;; buffer-substring-no-properties
+
+(cond
+ ((fboundp 'buffer-substring-no-properties))
+ ((fboundp 'buffer-substring-without-properties)
+ (defalias 'buffer-substring-no-properties
+ 'buffer-substring-without-properties))
+ (t
+ (defalias 'buffer-substring-no-properties 'buffer-substring)))
+
+(provide 'caml-compat)
+
View
@@ -0,0 +1,125 @@
+;; useful colors
+
+
+(defun caml-make-face-italic (face)
+ (condition-case nil (make-face-italic face) (error nil)))
+(defun caml-make-face-bold (face)
+ (condition-case nil (make-face-bold face) (error nil)))
+(defun caml-make-face-unitalic (face)
+ (condition-case nil (make-face-unitalic face) (error nil)))
+(defun caml-make-face-unbold (face)
+ (condition-case nil (make-face-unbold face) (error nil)))
+
+
+(cond
+; ((and (x-display-color-p)
+; (not (memq 'font-lock-type-face (face-list))))
+ (t
+ ; make the necessary faces
+ (make-face 'caml-font-lock-comment-face)
+ (set-face-foreground 'caml-font-lock-comment-face "Firebrick")
+ (caml-make-face-italic 'caml-font-lock-comment-face)
+ (make-face 'caml-font-lock-reference-face)
+ (set-face-foreground 'caml-font-lock-reference-face "Firebrick")
+ (make-face 'caml-font-lock-local-face)
+ (set-face-foreground 'caml-font-lock-local-face "Pink4")
+ (make-face 'caml-font-lock-string-face)
+ (set-face-foreground 'caml-font-lock-string-face "DarkGreen")
+ (make-face 'caml-font-lock-function-name-face)
+ (set-face-foreground 'caml-font-lock-function-name-face "Blue2")
+ (make-face 'caml-font-lock-keyword-face)
+ (set-face-foreground 'caml-font-lock-keyword-face "purple")
+ (caml-make-face-bold 'caml-font-lock-keyword-face)
+ (make-face 'caml-font-lock-variable-name-face)
+ (set-face-foreground 'caml-font-lock-variable-name-face "DarkOliveGreen4")
+ (make-face 'caml-font-lock-type-face)
+ (set-face-foreground 'caml-font-lock-type-face "darkorange2")
+ (caml-make-face-bold 'caml-font-lock-type-face)
+ (make-face 'caml-font-lock-reference-face)
+ (set-face-foreground 'caml-font-lock-reference-face "CadetBlue")
+))
+
+
+; The same definition is in caml.el:
+; we don't know in which order they will be loaded.
+(defvar caml-quote-char "'"
+ "*Quote for character constants. \"'\" for Objective Caml, \"`\" for Caml-Light.")
+
+; (defconst caml-font-lock-keywords
+(setq caml-font-lock-keywords
+
+ (list
+;comments
+ '("\\(^\\|[^\"]\\)\\((\\*[^*]*\\*+\\([^)*][^*]*\\*+\\)*)\\)"
+ 2 'caml-font-lock-comment-face)
+;character literals
+ (cons (concat caml-quote-char "\\(\\\\\\([ntbr" caml-quote-char "\\]\\|"
+ "[0-9][0-9][0-9]\\)\\|.\\)" caml-quote-char
+ "\\|\"[^\"\\]*\\(\\\\\\(.\\|\n\\)[^\"\\]*\\)*\"")
+ 'font-lock-string-face)
+;labels (and open)
+ '("\\([?]?\\<[A-Za-zéèà][A-Za-zéèà0-9_']*:\\)\\([^:=]\\|\\'\\|$\\)" 1
+ 'caml-font-lock-variable-name-face)
+ '("\\<\\(assert\\|open\\|include\\)\\>\\|[?]?\\<:[A-Za-zéèà][A-Za-zéèà0-9_']*\\>"
+ . 'caml-font-lock-variable-name-face)
+;modules and constructors
+ '("\\(\\<\\|:\\)\\([A-Z][A-Za-zéèà0-9_']*\\)\\>"
+ 2 'caml-font-lock-function-name-face)
+ '("`[A-Za-zéèà][A-Za-zéèà0-9_']*\\>" . 'caml-font-lock-function-name-face)
+;definition
+ (cons (concat
+ "\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
+ "\\|ex\\(ception\\|ternal\\)\\|fun\\(ct\\(ion\\|or\\)\\)?"
+ "\\|in\\(herit\\|itializer\\)?\\|let"
+ "\\|m\\(ethod\\|utable\\|odule\\)"
+ "\\|of\\|p\\(arser\\|rivate\\)\\|rec\\|type"
+ "\\|v\\(al\\(ue\\)?\\|irtual\\)\\)\\>")
+ (quote 'caml-font-lock-type-face))
+;blocking
+ '("\\(\\<\\|:\\)\\(begin\\|end\\|object\\|s\\(ig\\|truct\\)\\)\\>"
+ 2 'caml-font-lock-keyword-face)
+;control
+ (cons (concat
+ "\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|if"
+ "\\|lazy\\|match\\|new\\|or\\|t\\(hen\\|o\\|ry\\)"
+ "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
+ "\\|\|\\|->\\|&\\|#")
+ (quote 'caml-font-lock-reference-face))
+ '("\\<raise\\>" . 'caml-font-lock-comment-face)))
+
+(defconst inferior-caml-font-lock-keywords
+ (append
+ (list
+;inferior
+ '("^[#-]" . 'caml-font-lock-comment-face)
+;labels
+ '("[? \t]:[A-Za-zéèà][A-Za-zéèà0-9_']*\\>" . 'caml-font-lock-variable-name-face))
+ caml-font-lock-keywords))
+
+;; font-lock commands are similar for caml-mode and inferior-caml-mode
+(setq caml-mode-hook
+ '(lambda ()
+ (cond
+ ((fboundp 'global-font-lock-mode)
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults
+ '(caml-font-lock-keywords nil nil ((?' . "w") (?_ . "w")))))
+ (t
+ (setq font-lock-keywords caml-font-lock-keywords)))
+ (setq font-lock-keywords-only t)
+ (font-lock-mode 1)))
+
+(setq inferior-caml-mode-hooks
+ '(lambda ()
+ (cond
+ ((fboundp 'global-font-lock-mode)
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults
+ '(inferior-caml-font-lock-keywords
+ nil nil ((?' . "w") (?_ . "w")))))
+ (t
+ (setq font-lock-keywords inferior-caml-font-lock-keywords)))
+ (setq font-lock-keywords-only t)
+ (font-lock-mode 1)))
+
+(provide 'caml-font)
View
@@ -0,0 +1,57 @@
+; Highlighting patterns for hilit19 under caml-mode
+
+; defined also in caml.el
+(defvar caml-quote-char "'"
+ "*Quote for character constants. \"'\" for Objective Caml, \"`\" for Caml-Light.")
+
+(defconst caml-mode-patterns
+ (list
+;comments
+ '("\\(^\\|[^\"]\\)\\((\\*[^*]*\\*+\\([^)*][^*]*\\*+\\)*)\\)"
+ 2 comment)
+;string
+ (list 'hilit-string-find (string-to-char caml-quote-char) 'string)
+ (list (concat caml-quote-char "\\(\\\\\\([ntbr" caml-quote-char "\\]\\|"
+ "[0-9][0-9][0-9]\\)\\|.\\)" caml-quote-char)
+ nil
+ 'string)
+;labels
+ '("[?]?\\<[A-Za-z][A-Za-z0-9_\']*:" nil brown)
+ '("[?]?\\<:[A-Za-z][A-Za-z0-9_\']*\\>" nil brown)
+;modules
+ '("\\<\\(assert\\|open\\|include\\)\\>" nil brown)
+ '("\\<[A-Z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
+ '("`[A-Za-z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
+;definition
+ (list (concat
+ "\\<\\(a\\(nd\\|s\\)\\|c\\(onstraint\\|lass\\)"
+ "\\|ex\\(ception\\|ternal\\)\\|fun\\(ct\\(ion\\|or\\)\\)?"
+ "\\|in\\(herit\\)?\\|let\\|m\\(ethod\\|utable\\|odule\\)"
+ "\\|of\\|p\\(arser\\|rivate\\)\\|rec\\|type"
+ "\\|v\\(al\\(ue\\)?\\|irtual\\)\\)\\>")
+ nil 'ForestGreen)
+;blocking
+ '("\\(\\<\\|:\\)\\(object\\|struct\\|sig\\|begin\\|end\\)\\>"
+ 2 include)
+;control
+ (list (concat
+ "\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|if"
+ "\\|lazy\\|match\\|new\\|or\\|t\\(hen\\|o\\|ry\\)"
+ "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
+ "\\|\|\\|->\\|&\\|#")
+ nil 'keyword)
+ '(";" nil struct))
+ "Hilit19 patterns used for Caml mode")
+
+(hilit-set-mode-patterns 'caml-mode caml-mode-patterns)
+(hilit-set-mode-patterns
+ 'inferior-caml-mode
+ (append
+ (list
+;inferior
+ '("^[#-]" nil firebrick)
+ '("`[A-Za-z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
+ '("[? \t]:[A-Za-z][A-Za-z0-9_\']*\\>" nil brown))
+ caml-mode-patterns))
+
+(provide 'caml-hilit)
Oops, something went wrong.

0 comments on commit 43e95bd

Please sign in to comment.