mutated_ocaml / INSTALL-ocamlspot.txt

1. OCamlSpotter required patching against the original OCaml compiler,
   but now, thanks to the very kind interpretation of the OCaml license
   by INRIA, OCamlSpot can be distributed as an entire modified source code
   tree of OCaml with modificaiton.

2. Relax

3. For non Unix users: this instruction is for Unix users. For non unices,
   the build should be in the same way but may require some additional preparations.
   First of all, learn how to build the vanilla OCaml in your environment.
   Read INSTALL and README.win32

4. Build a bytecode compiler

  - ./configure
  - make core coreboot

6. Continue building

  - make world
  - make opt
  - make opt.opt

8. Install it

  - make install

9. Emacs interface

  Write the following into your .emacs:

  ; load-path
  (setq load-path (cons "WHERE-YOU-HAVE-INSTALLED-THE-ELISP" load-path))

  ; set the path of the ocamlspot binary
  (setq ocamlspot-path "WHERE-YOU-HAVE-INSTALLED-THE-BINARIES/ocamlspot")

  ; autoload
  (autoload 'ocamlspot-query "ocamlspot" "OCamlSpot")

  ; tuareg mode hook (use caml-mode-hook instead if you use caml-mode)
  (add-hook 'tuareg-mode-hook
  	  '(lambda ()
  	     (local-set-key "\C-c;" 'ocamlspot-query)
  	     (local-set-key "\C-c\C-t" 'ocamlspot-type)
             (local-set-key "\C-c\C-y" 'ocamlspot-type-and-copy)
  	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
  	     (local-set-key "\C-ct" 'caml-types-show-type)))

10. How to use

  Compile your ML project by this patched compiler with -annot option to create .spot files. 
  Open one of the source files in Emacs and place the cursor at the name whose definition 
  is in question. Type C-c; will show you the defintion.

11. Bug report

  Please report bugs to jun.furuse at gmail.