diff --git a/README.md b/README.md index c14c814..a7cf2af 100644 --- a/README.md +++ b/README.md @@ -153,13 +153,15 @@ have it enabled by default with the following configuration (add-hook 'tuareg-mode-hook 'utop-minor-mode) ``` -If you plan to use utop with another major-mode than tuareg, -e.g. typerex, then you will need the following configuration instead +If you plan to use utop with another major-mode than tuareg, replace +`tuareg-mode-hook` by the appropriate hook. The utop minor mode will +work out of the box with these modes: `tuareg-mode`, `caml-mode` and +`typerex-mode`. For other modes you will need to set the following +three variables: -```scheme -(autoload 'utop-minor-mode "utop" "Minor mode for utop" t) -(add-hook 'typerex-mode-hook 'utop-minor-mode) -``` +- `utop-skip-blank-and-comments` +- `utop-skip-to-end-of-phrase` +- `utop-discover-phrase` You can also complete text in a buffer using the environment of the toplevel. For that bind the function `utop-edit-complete` to the key diff --git a/man/utop.1 b/man/utop.1 index ae1db2b..20c3aae 100644 --- a/man/utop.1 +++ b/man/utop.1 @@ -75,14 +75,13 @@ file: then you can run utop by pressing M-x and typing "utop". utop support completion in emacs mode. Just press Tab to complete a word. You can -also integrate it with the tuareg or typerex mode. For that add the -following lines to your +also integrate it with the tuareg, caml or typerex mode. For that add +the following lines to your .I ~/.emacs file: - (autoload 'utop-setup-ocaml-buffer "utop" "Toplevel for OCaml" t) - (add-hook 'tuareg-mode-hook 'utop-setup-ocaml-buffer) - (add-hook 'typerex-mode-hook 'utop-setup-ocaml-buffer) + (autoload 'utop-minor-mode "utop" "Minor mode for utop" t) + (add-hook 'tuareg-mode-hook 'utop-minor-mode) .SH OPTIONS Same as