Permalink
Browse files

adding a new rev of tuareg-mode and markdown-mode. killing old tuareg…

… files
  • Loading branch information...
1 parent 5ba9b8e commit 5d187aa379022b4d89b690b5d28d0628632c80cc @stevej committed Dec 4, 2012
Showing with 6,588 additions and 2,372 deletions.
  1. +2 −0 customizations/modes.el
  2. +2 −1 init.el
  3. +2,021 −0 vendor/markdown-mode/markdown-mode.el
  4. +108 −0 vendor/tuareg/Makefile
  5. +54 −105 vendor/tuareg/README
  6. +766 −0 vendor/tuareg/ocamldebug.el
  7. +1 −0 vendor/tuareg/tuareg-pkg.el
  8. +3,634 −2,266 vendor/tuareg/tuareg.el
View
@@ -128,6 +128,8 @@
("\\.ml" . tuareg-mode)
("\\.rb" . ruby-mode)
("\\.pp" . ruby-mode)
+ ("\\.md" . markdown-mode)
+ ("\\.markdown" . markdown-mode)
("Capfile" . ruby-mode)
("capfile" . ruby-mode)
("Gemfile" . ruby-mode)
View
@@ -38,6 +38,7 @@
(vendor 'jasmin)
(vendor 'js2-mode)
(vendor 'lua-mode)
+(vendor 'markdown-mode)
(vendor 'multi-web-mode)
(vendor 'magit)
(vendor 'nav)
@@ -58,7 +59,7 @@
(vendor 'textmate)
(vendor 'thrift-mode)
;(vendor 'two-mode-mode)
-;;(vendor 'tuareg)
+(vendor 'tuareg)
(vendor 'verilog-mode)
(vendor 'yaml-mode)

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,108 @@
+VERSION = $(shell grep ';; Version:' tuareg.el \
+ | sed 's/;; Version: *\([0-9.]\+\).*/\1/')
+DESCRIPTION = $(shell grep ';;; tuareg.el ---' tuareg.el \
+ | sed 's/[^-]*--- *\(.*\)/\1/')
+REQUIREMENTS = $(shell grep ';; Package-Requires:' tuareg.el \
+ | sed 's/;; Package-Requires: *\(.\+\).*/\1/')
+DIST_NAME = tuareg-$(VERSION)
+
+ELS = tuareg.el ocamldebug.el
+ELC = $(ELS:.el=.elc)
+
+DIST_FILES += $(ELS) Makefile README
+
+EMACS = emacs
+
+#ENABLE_SMIE = --eval '(setq tuareg-use-smie t)'
+RM = rm -rf
+CP = cp -f
+LN = ln
+DIFF = diff -u -B
+
+INSTALL_RM_R = $(RM)
+INSTALL_MKDIR = mkdir
+INSTALL_CP = $(CP)
+
+all : elc tuareg-site-file.el
+
+elc : $(ELC)
+
+%.elc : %.el
+ $(EMACS) -batch $(NOINIT) -f batch-byte-compile $<
+
+# ifneq ($(realpath .hg),)
+# POST_INSTALL_HOOK = $(RM) $(VERSION_FILE)
+# MAKE_VERSION_FILE = hg id -i | fgrep -v '+' >/dev/null || \
+# (echo 'uncommitted changes' >&2; exit 1); \
+# hg id -i --debug > $(VERSION_FILE)
+# else
+# ifneq ($(realpath .svn),)
+# POST_INSTALL_HOOK = $(RM) $(VERSION_FILE)
+# MAKE_VERSION_FILE = svn info | grep Revision: | sed 's/Revision: //' > $(VERSION_FILE)
+# else
+# ifneq ($(realpath .bzr),)
+# POST_INSTALL_HOOK = $(RM) $(VERSION_FILE)
+# MAKE_VERSION_FILE = bzr log -l -1 | grep revno: > $(VERSION_FILE)
+# else
+# ifneq ($(realpath $(VERSION_FILE)),)
+# POST_INSTALL_HOOK =
+# MAKE_VERSION_FILE = @echo "Using \"$(VERSION_FILE)\" in the distribution."
+# else
+# POST_INSTALL_HOOK =
+# MAKE_VERSION_FILE = @(echo "missing \"$(VERSION_FILE)\" in the distribution?" >&2; exit 1)
+# endif
+# endif
+# endif
+# endif
+
+# install : $(ELC) $(VERSION_FILE)
+# fgrep `cat $(VERSION_FILE)` tuareg.elc >/dev/null 2>&1 || \
+# ($(RM) tuareg.elc; $(MAKE) tuareg.elc)
+# $(INSTALL_RM_R) ${DEST}
+# $(INSTALL_MKDIR) ${DEST}
+# for f in $(ELS) $(ELC) $(VERSION_FILE); do $(INSTALL_CP) $$f $(DEST)/$$f; done
+# $(POST_INSTALL_HOOK)
+
+
+.PHONY: refresh
+refresh:
+
+check : sample.ml.test
+
+%.test: % $(ELC) refresh
+ @echo ====Indent $*====
+ -$(RM) $@
+ $(EMACS) --batch -q --no-site-file $(ENABLE_SMIE) \
+ --load tuareg.elc $< \
+ --eval '(setq indent-tabs-mode nil)' \
+ --eval '(defun ask-user-about-lock (file opponent) nil)' \
+ --eval '(indent-region (point-min) (point-max) nil)' \
+ --eval '(indent-region (point-min) (point-max) nil)' \
+ --eval '(write-region (point-min) (point-max) "$@")'
+ $(DIFF) $< $@ || true
+
+tuareg-site-file.el: refresh
+ echo "\
+ ;;; $@ --- Automatically extracted autoloads.\n\
+ ;;; Code:\n\
+ (add-to-list 'load-path\n\
+ (or (file-name-directory load-file-name) (car load-path)))\n\
+ " >$@
+ $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
+
+.PHONY: dist tar
+dist: $(DIST_NAME).tar.gz
+tar: $(DIST_NAME).tar
+
+$(DIST_NAME).tar.gz $(DIST_NAME).tar: $(DIST_FILES)
+ mkdir -p $(DIST_NAME)
+ for f in $(DIST_FILES); do $(LN) $$f $(DIST_NAME); done
+ echo '(define-package "tuareg" "$(VERSION)" "$(DESCRIPTION)" ' "'"'$(REQUIREMENTS))' > $(DIST_NAME)/tuareg-pkg.el
+ tar acvf $@ $(DIST_NAME)
+ $(RM) -rf $(DIST_NAME)
+
+clean :
+ $(RM) $(ELC) "$(DIST_NAME).tar.gz" "$(DIST_NAME).tar"
+# $(POST_INSTALL_HOOK)
+
+# .PHONY : all elc clean install force check distrib dist
View
@@ -1,118 +1,69 @@
DESCRIPTION:
-This archive contains files to help editing Caml code, to hilight
-important parts of the code, to run a Caml toplevel, and to run the
-Caml debugger within GNU Emacs/XEmacs editors. It is designed for
-Objective Caml but handles Camllight syntax as well.
+This archive contains files to help editing OCaml code, to highlight
+important parts of the code, to run an OCaml toplevel, and to run the
+Caml debugger within Emacs.
CONTENTS:
README This file.
HISTORY Differences with previous versions.
- tuareg.el A major mode for editing Tuareg code in Emacs/XEmacs.
- sym-lock.el An extension to XEmacs Font-Lock for symbol fontifying.
- camldebug.el To run the Caml debugger under Emacs.
- append-tuareg.el Configuration file for quick installation
- custom-tuareg.el Tuareg customization example
+ tuareg.el A major mode for editing OCaml code in Emacs.
+ ocamldebug.el To run the OCaml debugger under Emacs.
+ dot-emacs.el Configuration file for quick installation
+ sample.ml Sample file to check the indentation engine.
INSTALL:
- If you have the right to put files in Emacs / XEmacs `site-lisp'
- directory, you only have to copy the `tuareg.el', `camldebug.el'
- and `sym-lock.el' files in it (Sym-Lock works with XEmacs only).
+ See tuareg.el
- Otherwise, choose a directory, e.g., `foo'. Copy the `tuareg.el'
- `camldebug.el' and `sym-lock.el' files in it (Sym-Lock works with
- XEmacs only). Then add the following line to your `.emacs', where
- `foo' is replaced by the appropriate directory FULL PATH:
+CONFIGURATION:
- (setq load-path (cons "foo" load-path))
-
-QUICK CONFIGURATION:
-
- If you are no Emacs-Lisp addict, and would like to use Tuareg
- NOW, append (or copy) `append-tuareg.el' file to your `.emacs'
- configuration file. It tells XEmacs to load Tuareg and Sym-Lock
- automatically.
-
- Consider updating your `.emacs' configuration file by hand if you
- keep on using Tuareg.
-
-MANUAL CONFIGURATION:
-
- Add the following lines to your .emacs file:
-
- (setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist))
- (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
- (autoload 'camldebug "camldebug" "Run the Caml debugger" t)
+ Add the following line near the beginning of your ~/.emacs file:
+ (load "/where/ever/you/put/tuareg-mode/tuareg-site-file")
+
The Tuareg major mode is triggered by visiting a file with extension
- .ml, .mli, .mly, .mll, .mlp... or manually by M-x tuareg-mode. It
- gives you the correct syntax table for the Caml language.
-
- If you use XEmacs, the Font-Lock minor-mode is used accordingly to
- your customization options.
-
- Within Emacs, you may want to use Font-Lock in addding the following
- lines to the configuration file:
-
- (if (and (boundp 'window-system) window-system)
- (require 'font-lock))
+ .ml, .mli, .mly, .mll, and .mlp or manually by M-x tuareg-mode. It
+ gives you the correct syntax table for the OCaml language.
- Within XEmacs (more generally, if you have variable-sized fonts and
- `atomic-extents' library supported) you may also want to use
- Sym-Lock Warning: MULE (multilingual) versions of XEmacs do not
- support multiple font encodings in a single buffer, which is
- required by Sym-Lock. Configuring Tuareg with Sym-Lock is done as
- follows:
-
- (if (and (boundp 'window-system) window-system)
- (when (string-match "XEmacs" emacs-version)
- (if (not (and (boundp 'mule-x-win-initted) mule-x-win-initted))
- (require 'sym-lock))
- (require 'font-lock)))
+ Thanks to the work of Stefan Monnier, a new indentation engine based
+ on SMIE was written. To activate it, add (setq tuareg-use-smie t)
+ to the top-level of your .emacs file.
USAGE:
- Tuareg allows you to run batch Caml compilations from Emacs (using
- M-x compile) and browse the errors (C-x `). Typing C-x ` sets the
- point at the beginning of the erroneous program fragment, and the
- mark at the end. Under Emacs, the program fragment is temporarily
- hilighted.
-
- M-x tuareg-run-caml starts a Caml toplevel with input and output in
- an Emacs buffer named `*caml-toplevel*. This gives you the full
- power of Emacs to edit the input to the Caml toplevel. This mode is
- based on comint so you get all the usual comint features, including
- command history. A hook named `tuareg-interactive-mode-hook' may be
- used for customization.
-
- Typing C-c C-e in a buffer in Caml mode sends the current phrase
- (containing the point) to the Caml toplevel, and evaluates it. If
- you type one of these commands before M-x tuareg-run-caml, the
- toplevel will be started automatically.
-
- M-x camldebug FILE starts the Caml debugger camldebug on the
- executable FILE, with input and output in an Emacs buffer named
- *camldebug-FILE*. It is similar to April 1996 version, with minor
- changes to support XEmacs, Tuareg and OCaml. Furthermore, package
- `thingatpt' is not required any more.
+ See tuareg.el.
CUSTOMIZATION
The standard Emacs customization tool can be used to configure
- Tuareg options. It is available from the Options menu and Tuareg's
+ Tuareg options. It is available from the Options menu and Tuareg's
Customize sub-menu.
- You may also customize the appearance of Caml code by twiddling the
+ You may also customize the appearance of OCaml code by twiddling the
variables listed at the start of tuareg.el (preferably using
- `tuareg-mode-hook', you should not patch the file directly). You
- should then add to your configuration file something like: (add-hook
- 'tuareg-mode-hook '(lambda () ... ; your customization code ))
-
- `custom-tuareg.el' is a sample customization file for standard
- changes. You can append it to your `.emacs' or use it as a tutorial.
-
+ `tuareg-mode-hook', you should not patch the file directly).
+ You should then add to your configuration file something like:
+ (add-hook 'tuareg-mode-hook
+ (lambda () ... ; your customization code ))
+
+SAMPLE CUSTOMIZATIONS
+
+ Here are random examples of customization you might like to put in
+ your ~/.emacs file:
+
+ ;; Indent `=' like a standard keyword.
+ (setq tuareg-lazy-= t)
+ ;; Indent [({ like standard keywords.
+ (setq tuareg-lazy-paren t)
+ ;; No indentation after `in' keywords.
+ (setq tuareg-in-indent 0)
+
+ (add-hook 'tuareg-mode-hook
+ ;; Turn on auto-fill minor mode.
+ (lambda () (auto-fill-mode 1)))
+
FEATURES, KNOWN BUGS:
Cf. online help.
@@ -123,16 +74,15 @@ THANKS:
debugger enhancement.
Jacques Garrigue enhanced Zimmerman's mode along with an adaptation
- to Objective Caml (and Labl) syntax. Although this work was
- performed independently, his useful test file and comments were of
- great help.
+ to OCaml (and Labl) syntax. Although this work was performed
+ independently, his useful test file and comments were of great help.
Michel Quercia for excellent suggestions, patches, and helpful
emacs-lisp contributions (full, ready-to-work implementations, I
should say), especially for Tuareg interactive mode, and browser
capacities.
- Denis Barthou, Pierre Boulet, Jean-Christophe Filliatre and R�mi
+ Denis Barthou, Pierre Boulet, Jean-Christophe Filliatre and Rémi
Vanicat for intensive testing, useful suggestions, and help.
Ralf Treinen for maintaining the Debian GNU/Linux package.
@@ -141,23 +91,22 @@ THANKS:
patches. Nothing would have improved since version 0.9.2 without
their help. Special thanks to Eli Barzilay, Josh Berdine, Christian
Boos, Carsten Clasohm, Yann Coscoy, Prakash Countcham, Alvarado
- Cuihtlauac, Erwan David, Gilles D�fourneaux, Philippe Esperet,
+ Cuihtlauac, Erwan David, Gilles Défourneaux, Philippe Esperet,
Gilles Falcon, Tim Freeman, Alain Frisch, Christian Lindig, Claude
- March�, Charles Martin, Dave Mason, Stefan Monnier, Toby Moth,
+ Marché, Charles Martin, Dave Mason, Stefan Monnier, Toby Moth,
Jean-Yves Moyen, Alex Ott, Christopher Quinn, Ohad Rodeh, Rauli
Ruohonen, Hendrik Tews, Christophe Troestler, Joseph Sudish, Mattias
Waldau and John Whitley.
-REPORTING:
-
- The official Tuareg home page is located at:
+ Tuareg mode have been maintained by Albert Cohen until version 1.45.
- http://www-rocq.inria.fr/~acohen/tuareg
+ Jane Street took over maintenance based on Albert Cohen's version 1.46
+ (later retracted by him), and released its first version as 2.0.
- Bug reports, suggestions, donations etc. to:
+REPORTING:
- Albert Cohen
- Research Scientist - INRIA Rocquencourt
+ The official Tuareg home page is located at:
+ <https://forge.ocamlcore.org/projects/tuareg/>.
- E-Mail : Albert.Cohen@inria.fr
- WWW : http://www-rocq.inria.fr/~acohen
+ Bug reports & patches: use the tracker:
+ <https://forge.ocamlcore.org/tracker/?group_id=43>.
Oops, something went wrong.

0 comments on commit 5d187aa

Please sign in to comment.