Commits

camlspotter committed 5b8205c

doc

Comments (0)

Files changed (2)

ocamlspot/INSTALL-ocamlspot.txt

 
   It will clone the official 3.11.2 source in the current directory, 
   then apply the patch, and compile with the default configuration. 
+  Jump to 8 for the emacs lisp installation.
 
 1. Ok, you are not brain dead. Download OCaml compiler version 3.11.2.
 
 2. Extract the compiler source.
 
   - tar zxvf ocaml-3.11.2.tar.gz
-  - cd ocaml3.11.2
+  - cd ocaml-3.11.2
+    (do not forget the last cd)
 
 3. Extract ocamlspot.tgz and Apply the patch
 
   - tar zxvf ocamlspotter-1.1.tgz
   - mv ocamlspotter-1.1/* .
   - patch -p1 < compiler_patch.diff
-  - check the directory ocamlspot exists
+
+  Check your patched source tree. It should have ocamlspot directory with
+  the original files like INSTALL, LICENSE and VERSION.
 
 4. Build a bytecode compiler
 
 
   Write the following into your .emacs:
 
-  ; load path
-  (setq load-path (cons "???/ocaml/ocamlspot/") load-path))
-  ; the place of the ocamlspot binary
-  (setq ocamlspot-path "???/ocaml/ocamlspot/ocamlspot")
+  ; 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")
-  
-  ; 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-u" 'ocamlspot-use)
-	     (local-set-key "\C-cT" 'caml-types-show-type)))
-
+ 
+  ; 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)))
+ 
 9. How to use
 
   Compiler your ML project by this patched compiler with -annot option 

ocamlspot/ocamlspot.el

 ; (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\C-t" 'caml-types-show-type)
-; 	     (local-set-key "\C-c;" 'ocamlspot-query)))
-
+;   (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)))
+ 
 (defvar ocamlspot-buffer "*ocamlspot*")
 
 (defvar ocamlspot-path "OCAML-SOURCE-TREE/ocamlspot/ocamlspot"