emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] externals/caml 51403bf 028/197: MacOS: ajout macosunix; portage


From: Stefan Monnier
Subject: [nongnu] externals/caml 51403bf 028/197: MacOS: ajout macosunix; portage bigarray et systhreads; tabs
Date: Sat, 21 Nov 2020 01:19:31 -0500 (EST)

branch: externals/caml
commit 51403bf06e5218fe0f59da64b005e061fced698e
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>

    MacOS: ajout macosunix; portage bigarray et systhreads; tabs
    
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3042 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 README        |  50 +--
 README.itz    |  21 +-
 caml-font.el  |  74 ++---
 caml-hilit.el |  30 +-
 caml.el       | 992 +++++++++++++++++++++++++++++-----------------------------
 camldebug.el  | 580 +++++++++++++++++-----------------
 inf-caml.el   |  26 +-
 7 files changed, 886 insertions(+), 887 deletions(-)

diff --git a/README b/README
index f86ac62..e8da238 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-           O'Caml emacs mode, snapshot of $Date$
+        O'Caml emacs mode, snapshot of $Date$
 
 The files in this archive define a caml-mode for emacs, for editing
 Objective Caml and Objective Label programs, as well as an
@@ -15,10 +15,10 @@ see README.itz, which is the README from Ian Zimmerman's 
package.
 To use it, just put the .el files in your path, and add the following
 three lines in your .emacs.
 
-       (setq auto-mode-alist
-             (cons '("\\.ml[iylp]?$" . caml-mode) auto-mode-alist))
-       (autoload 'caml-mode "caml" "Major mode for editing Caml code." t)
-       (autoload 'run-caml "inf-caml" "Run an inferior Caml process." t)
+    (setq auto-mode-alist
+          (cons '("\\.ml[iylp]?$" . caml-mode) auto-mode-alist))
+    (autoload 'caml-mode "caml" "Major mode for editing Caml code." t)
+    (autoload 'run-caml "inf-caml" "Run an inferior Caml process." t)
 
 I added camldebug.el from the original distribution, since there will
 soon be a debugger for Objective Caml, but I do not know enough about
@@ -26,17 +26,17 @@ it.
 
 To install the mode itself, edit the Makefile and do
 
-       % make install
+    % make install
 
 To install ocamltags, do
 
-       % make install-ocamltags
+    % make install-ocamltags
 
 To use highlighting capabilities, add ONE of the following two
 lines to your .emacs.
 
-       (if window-system (require 'caml-hilit))
-       (if window-system (require 'caml-font))
+    (if window-system (require 'caml-hilit))
+    (if window-system (require 'caml-font))
 
 caml.el and inf-caml.el can be used collectively, but it might be a
 good idea to copy caml-hilit.el or caml-font.el to you own directory,
@@ -44,19 +44,19 @@ and edit it to your taste and colors.
 
 Main key bindings:
 
-TAB    indent current line
-M-C-q  indent phrase
-M-C-h  mark phrase
-C-c C-a        switch between interface and implementation
-C-c C-c        compile (usually make)
-C-x`   goto next error (also mouse button 2 in the compilation log)
+TAB indent current line
+M-C-q   indent phrase
+M-C-h   mark phrase
+C-c C-a switch between interface and implementation
+C-c C-c compile (usually make)
+C-x`    goto next error (also mouse button 2 in the compilation log)
 
 Once you have started caml by M-x run-caml:
 
-M-C-x  send phrase to inferior caml process
-C-c C-r        send region to inferior caml process
+M-C-x   send phrase to inferior caml process
+C-c C-r send region to inferior caml process
 C-c C-s show inferior caml process
-C-c`   goto error in expression sent by M-C-x
+C-c`    goto error in expression sent by M-C-x
 
 For other bindings, see C-h b.
 
@@ -107,7 +107,7 @@ Version 1.05:
   correctly even when you write them at the beginning of a line.
 
 * added a Caml menu, and Imenu support. Imenu menu can be disabled
-  by setting the variable caml-imenu-disable to t. 
+  by setting the variable caml-imenu-disable to t.
   Xemacs support for the Menu, but no Imenu.
 
 * key bindings closer to lisp-mode.
@@ -122,8 +122,8 @@ Version 1.03b:
 * many bugs corrected.
 
 * (partial) compatibility with Caml-Light added.
-       (setq caml-quote-char "`")
-       (setq inferior-caml-program "camllight")
+    (setq caml-quote-char "`")
+    (setq inferior-caml-program "camllight")
   Literals will be correctly understood and highlighted. However,
   indentation rules are still Objective Caml's: this just happens to
   work well in most cases, but is only intended for occasional use.
@@ -152,14 +152,14 @@ Some remarks about the style supported:
 
 Since Objective Caml's syntax is very liberal (more than 100
 shift-reduce conflicts with yacc), automatic indentation is far from
-easy. Moreover, you expect the indentation to be not purely syntactic, 
+easy. Moreover, you expect the indentation to be not purely syntactic,
 but also semantic: reflecting the meaning of your program.
 
 This mode tries to be intelligent. For instance some operators are
-indented differently in the middle and at the end of a line (thanks to 
+indented differently in the middle and at the end of a line (thanks to
 Ian Zimmerman). Also, we do not indent after if .. then .. else, when
 else is on the same line, to reflect that this idiom is equivalent to
-a return instruction in a more imperative language, or after the in of 
+a return instruction in a more imperative language, or after the in of
 let .. in, since you may see that as an assignment.
 
 However, you may want to use a different indentation style. This is
@@ -178,4 +178,4 @@ in other cases may confuse the phrase selection function.
 
 Comments and bug reports to
 
-       Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
+    Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
diff --git a/README.itz b/README.itz
index 60678cf..8e1366f 100644
--- a/README.itz
+++ b/README.itz
@@ -15,9 +15,9 @@ CONTENTS:
 
     caml.el         A major mode for editing Caml code in Gnu Emacs
     inf-caml.el     To run a Caml toplevel under Emacs, with input and
-                    output in an Emacs buffer.    
+                    output in an Emacs buffer.
     camldebug.el    To run the Caml debugger under Emacs.
-    
+
 
 NOTE FOR EMACS 18 USERS:
 
@@ -66,7 +66,7 @@ distribution, and hacked on it. First, I added real syntax 
dependent
 indentation to caml mode. Like Xavier has said, it was hard (and I
 knew it would be), but I refused to believe it was impossible, partly
 because I knew of a Standard ML mode with indentation (written by
-Matthew Morley). 
+Matthew Morley).
 
 Indentation works pretty much like in other programming modes. C-j at
 the end of a line starts a new line properly indented. M-C-\ indents
@@ -80,14 +80,14 @@ TAB twice in succession. If you don't like this behaviour 
(but you
 should), it's quite easy to add to your startup code like this:
 
 (defun caml-old-style-indent ()
-       (if (caml-in-indentation)
-               (caml-indent-command)
-               (insert "\t")))
+        (if (caml-in-indentation)
+                (caml-indent-command)
+                (insert "\t")))
 
 (add-hook 'caml-mode-hook
-       (function (lambda ()
-               (define-key 'caml-mode-map "\t"
-                       caml-old-style-indent))))
+        (function (lambda ()
+                (define-key 'caml-mode-map "\t"
+                        caml-old-style-indent))))
 
 You can customize the appearance of your caml code by twiddling the
 variables listed at the start of caml.el. Good luck. :-)
@@ -102,7 +102,7 @@ with modern versions of Emacs. The main benefit here is 
that you can
 do debugger commands _from your caml source buffer_. Commands with the
 C-c prefix in the debugger buffer have counterparts which do the same
 thing (well, a similar thing) in the source buffer, with the C-x C-a
-prefix. 
+prefix.
 
 I made the existing debugger commands smarter in that they now attempt
 to guess the correct parameter to the underlying camldebug command. A
@@ -175,4 +175,3 @@ Ian T Zimmerman           
+-------------------------------------------+
 Box 13445                 I    With so many executioners available,   I
 Berkeley CA 94712 USA     I suicide is a really foolish thing to do.  I
 mailto:itz@rahul.net      +-------------------------------------------+
-
diff --git a/caml-font.el b/caml-font.el
index feb4c91..b5c58df 100644
--- a/caml-font.el
+++ b/caml-font.el
@@ -39,9 +39,9 @@
      2 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)
+                 "[0-9][0-9][0-9]\\)\\|.\\)" caml-quote-char
+                 "\\|\"[^\"\\]*\\(\\\\\\(.\\|\n\\)[^\"\\]*\\)*\"")
+         'font-lock-string-face)
 ;labels (and open)
    '("\\(\\<[A-Za-z][A-Za-z0-9_']*:\\)\\([^:=]\\|\\'\\|$\\)" 1
      font-lock-variable-name-face)
@@ -53,23 +53,23 @@
    '("`[A-Za-z][A-Za-z0-9_']*\\>" . 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\\)\\)\\>")
-        'font-lock-type-face)
+          "\\<\\(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\\)\\)\\>")
+         'font-lock-type-face)
 ;blocking
    '("\\(\\<\\|:\\)\\(begin\\|end\\|object\\|s\\(ig\\|truct\\)\\)\\>"
      2 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\\)\\)\\>"
-         "\\|\|\\|->\\|&\\|#")
-        'font-lock-reference-face) 
+          "\\<\\(do\\(ne\\|wnto\\)?\\|else\\|for\\|if"
+          "\\|lazy\\|match\\|new\\|or\\|t\\(hen\\|o\\|ry\\)"
+          "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>"
+          "\\|\|\\|->\\|&\\|#")
+         'font-lock-reference-face)
    '("\\<raise\\>" . font-lock-comment-face)))
 
 (defconst inferior-caml-font-lock-keywords
@@ -80,33 +80,33 @@
 ;labels
     '("[? \t]:[A-Za-z][A-Za-z0-9_']*\\>" . 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)))
-        (make-local-variable 'font-lock-keywords-only)
-        (setq font-lock-keywords-only t)
-        (font-lock-mode 1)))
+         (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)))
+         (make-local-variable 'font-lock-keywords-only)
+         (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)))
-        (make-local-variable 'font-lock-keywords-only)
-        (setq font-lock-keywords-only t)
-        (font-lock-mode 1)))
+         (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)))
+         (make-local-variable 'font-lock-keywords-only)
+         (setq font-lock-keywords-only t)
+         (font-lock-mode 1)))
 
 (provide 'caml-font)
diff --git a/caml-hilit.el b/caml-hilit.el
index d6521e3..68ba853 100644
--- a/caml-hilit.el
+++ b/caml-hilit.el
@@ -12,9 +12,9 @@
 ;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)
+                 "[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)
@@ -24,22 +24,22 @@
    '("`[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)
+          "\\<\\(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)
+          "\\<\\(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")
 
@@ -49,7 +49,7 @@
  (append
   (list
 ;inferior
-   '("^[#-]"   nil     firebrick)
+   '("^[#-]"    nil     firebrick)
    '("`[A-Za-z][A-Za-z0-9_\']*\\>" nil MidnightBlue)
    '("[? \t]:[A-Za-z][A-Za-z0-9_\']*\\>" nil brown))
   caml-mode-patterns))
diff --git a/caml.el b/caml.el
index 153d42d..5457060 100644
--- a/caml.el
+++ b/caml.el
@@ -29,15 +29,15 @@
 
 Priorities are assigned to `interesting' caml operators as follows:
 
-       all keywords 0 to 7     8
-       type, val, ... + 0      7
-       :: ^                    6
-       @                       5
-       := <-                   4
-       if                      3
-       fun, let, match ...     2
-       module                  1
-       opening keywords        0.")
+        all keywords 0 to 7     8
+        type, val, ... + 0      7
+        :: ^                    6
+        @                       5
+        := <-                   4
+        if                      3
+        fun, let, match ...     2
+        module                  1
+        opening keywords        0.")
 
 (defvar caml-apply-extra-indent 2
   "*How many spaces to add to indentation for an application in caml mode.")
@@ -55,11 +55,11 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a exception keyword in caml mode.")
 (make-variable-buffer-local 'caml-exception-indent)
 
-(defvar caml-for-indent        2
+(defvar caml-for-indent 2
   "*How many spaces to indent from a for keyword in caml mode.")
 (make-variable-buffer-local 'caml-for-indent)
 
-(defvar caml-fun-indent        2
+(defvar caml-fun-indent 2
   "*How many spaces to indent from a fun keyword in caml mode.")
 (make-variable-buffer-local 'caml-fun-indent)
 
@@ -67,7 +67,7 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a function keyword in caml mode.")
 (make-variable-buffer-local 'caml-function-indent)
 
-(defvar caml-if-indent 2
+(defvar caml-if-indent  2
   "*How many spaces to indent from a if keyword in caml mode.")
 (make-variable-buffer-local 'caml-if-indent)
 
@@ -87,7 +87,7 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a include keyword in caml mode.")
 (make-variable-buffer-local 'caml-include-indent)
 
-(defvar caml-let-indent        2
+(defvar caml-let-indent 2
   "*How many spaces to indent from a let keyword in caml mode.")
 (make-variable-buffer-local 'caml-let-indent)
 
@@ -127,7 +127,7 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a struct keyword in caml mode.")
 (make-variable-buffer-local 'caml-struct-indent)
 
-(defvar caml-try-indent        2
+(defvar caml-try-indent 2
   "*How many spaces to indent from a try keyword in caml mode.")
 (make-variable-buffer-local 'caml-try-indent)
 
@@ -135,7 +135,7 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a type keyword in caml mode.")
 (make-variable-buffer-local 'caml-type-indent)
 
-(defvar caml-val-indent        2
+(defvar caml-val-indent 2
   "*How many spaces to indent from a val keyword in caml mode.")
 (make-variable-buffer-local 'caml-val-indent)
 
@@ -143,11 +143,11 @@ Priorities are assigned to `interesting' caml operators 
as follows:
   "*How many spaces to indent from a while keyword in caml mode.")
 (make-variable-buffer-local 'caml-while-indent)
 
-(defvar caml-::-indent 2
+(defvar caml-::-indent  2
   "*How many spaces to indent from a :: operator in caml mode.")
 (make-variable-buffer-local 'caml-::-indent)
 
-(defvar caml-@-indent  2
+(defvar caml-@-indent   2
   "*How many spaces to indent from a @ operator in caml mode.")
 (make-variable-buffer-local 'caml-@-indent)
 
@@ -155,11 +155,11 @@ Priorities are assigned to `interesting' caml operators 
as follows:
   "*How many spaces to indent from a := operator in caml mode.")
 (make-variable-buffer-local 'caml-:=-indent)
 
-(defvar caml-<--indent 2
+(defvar caml-<--indent  2
   "*How many spaces to indent from a <- operator in caml mode.")
 (make-variable-buffer-local 'caml-<--indent)
 
-(defvar caml-->-indent 2
+(defvar caml-->-indent  2
   "*How many spaces to indent from a -> operator in caml mode.")
 (make-variable-buffer-local 'caml-->-indent)
 
@@ -171,7 +171,7 @@ Priorities are assigned to `interesting' caml operators as 
follows:
   "*How many spaces to indent from a \{ operator in caml mode.")
 (make-variable-buffer-local 'caml-lc-indent)
 
-(defvar caml-lp-indent 1
+(defvar caml-lp-indent  1
   "*How many spaces to indent from a \( operator in caml mode.")
 (make-variable-buffer-local 'caml-lp-indent)
 
@@ -256,7 +256,7 @@ have caml-electric-indent on, which see.")
 
 ;;code
 (if (or (not (fboundp 'indent-line-to))
-       (not (fboundp 'buffer-substring-no-properties)))
+        (not (fboundp 'buffer-substring-no-properties)))
     (require 'caml-compat))
 
 (defvar caml-shell-active nil
@@ -277,7 +277,7 @@ have caml-electric-indent on, which see.")
   (define-key caml-mode-map [backtab] 'caml-unindent-command)
 
 ;itz 04-21-96 instead of defining a new function, use defadvice
-;that way we get out effect even when we do \C-x` in compilation buffer  
+;that way we get out effect even when we do \C-x` in compilation buffer
 ;  (define-key caml-mode-map "\C-x`" 'caml-next-error)
 
   (define-key caml-mode-map "\177" 'backward-delete-char-untabify)
@@ -302,14 +302,14 @@ have caml-electric-indent on, which see.")
   (define-key caml-mode-map "\M-\C-x" 'caml-eval-phrase)
   (if running-xemacs nil ; if not running xemacs
     (let ((map (make-sparse-keymap "Caml"))
-         (forms (make-sparse-keymap "Forms")))
+          (forms (make-sparse-keymap "Forms")))
       (define-key caml-mode-map "\C-c\C-d" 'caml-show-imenu)
       (define-key caml-mode-map [menu-bar] (make-sparse-keymap))
       (define-key caml-mode-map [menu-bar caml] (cons "Caml" map))
       (define-key map [run-caml] '("Start subshell..." . run-caml))
       (define-key map [compile] '("Compile..." . compile))
       (define-key map [switch-view]
-       '("Switch view" . caml-find-alternate-file))
+        '("Switch view" . caml-find-alternate-file))
       (define-key map [separator-format] '("--"))
       (define-key map [forms] (cons "Forms" forms))
       (define-key map [show-imenu] '("Show index" . caml-show-imenu))
@@ -320,7 +320,7 @@ have caml-electric-indent on, which see.")
       (put 'caml-eval-phrase 'menu-enable 'caml-shell-active)
       (define-key map [indent-phrase] '("Indent phrase" . caml-indent-phrase))
       (define-key forms [while]
-       '("while .. do .. done" . caml-insert-while-form))
+        '("while .. do .. done" . caml-insert-while-form))
       (define-key forms [try] '("try .. with .." . caml-insert-try-form))
       (define-key forms [match] '("match .. with .." . caml-insert-match-form))
       (define-key forms [let] '("let .. in .." . caml-insert-let-form))
@@ -331,22 +331,22 @@ have caml-electric-indent on, which see.")
 (defvar caml-mode-xemacs-menu
   (if running-xemacs
       '("Caml"
-       [ "Indent phrase" caml-indent-phrase :keys "C-M-q" ]
-       [ "Eval phrase" caml-eval-phrase
-         :active caml-shell-active :keys "C-M-x" ]
-       [ "Show subshell" caml-show-subshell caml-shell-active ]
-       ("Forms"
-        [ "while .. do .. done" caml-insert-while-form t]
-        [ "try .. with .." caml-insert-try-form t ]
-        [ "match .. with .." caml-insert-match-form t ]
-        [ "let .. in .." caml-insert-let-form t ]
-        [ "if .. then .. else .." caml-insert-if-form t ]
-        [ "for .. do .. done" caml-insert-for-form t ]
-        [ "begin .. end" caml-insert-begin-form t ])
-       "---"
-       [ "Switch view" caml-find-alternate-file t ]
-       [ "Compile..." compile t ]
-       [ "Start subshell..." run-caml t ]))
+        [ "Indent phrase" caml-indent-phrase :keys "C-M-q" ]
+        [ "Eval phrase" caml-eval-phrase
+          :active caml-shell-active :keys "C-M-x" ]
+        [ "Show subshell" caml-show-subshell caml-shell-active ]
+        ("Forms"
+         [ "while .. do .. done" caml-insert-while-form t]
+         [ "try .. with .." caml-insert-try-form t ]
+         [ "match .. with .." caml-insert-match-form t ]
+         [ "let .. in .." caml-insert-let-form t ]
+         [ "if .. then .. else .." caml-insert-if-form t ]
+         [ "for .. do .. done" caml-insert-for-form t ]
+         [ "begin .. end" caml-insert-begin-form t ])
+        "---"
+        [ "Switch view" caml-find-alternate-file t ]
+        [ "Compile..." compile t ]
+        [ "Start subshell..." run-caml t ]))
   "Menu to add to the menubar when running Xemacs")
 
 (defvar caml-mode-syntax-table nil
@@ -369,7 +369,7 @@ have caml-electric-indent on, which see.")
   (modify-syntax-entry ?' "w" caml-mode-syntax-table)
   (modify-syntax-entry ?_ "w" caml-mode-syntax-table)
   ; : is part of words (labels) in O'Labl
-  (if caml-olabl-disable nil 
+  (if caml-olabl-disable nil
     (modify-syntax-entry ?: "w" caml-mode-syntax-table))
   ; ISO-latin accented letters and EUC kanjis are part of words
   (let ((i 160))
@@ -440,12 +440,12 @@ have caml-electric-indent on, which see.")
   ;garrigue july 97
   (if running-xemacs ; from Xemacs lisp mode
       (if (and (featurep 'menubar)
-              current-menubar)
-         (progn
-           ;; make a local copy of the menubar, so our modes don't
-           ;; change the global menubar
-           (set-buffer-menubar current-menubar)
-           (add-submenu nil caml-mode-xemacs-menu)))
+               current-menubar)
+          (progn
+            ;; make a local copy of the menubar, so our modes don't
+            ;; change the global menubar
+            (set-buffer-menubar current-menubar)
+            (add-submenu nil caml-mode-xemacs-menu)))
     ;imenu support (not for Xemacs)
     (make-local-variable 'imenu-create-index-function)
     (setq imenu-create-index-function 'caml-create-index-function)
@@ -454,7 +454,7 @@ have caml-electric-indent on, which see.")
     (make-local-variable 'caml-imenu-shown)
     (setq caml-imenu-shown nil)
     (if (and caml-imenu-enable (< (buffer-size) 10000))
-       (caml-show-imenu)))
+        (caml-show-imenu)))
   (run-hooks 'caml-mode-hook))
 
 ;;; Auxiliary function. Garrigue 96-11-01.
@@ -463,10 +463,10 @@ have caml-electric-indent on, which see.")
   (interactive)
   (let ((name (buffer-file-name)))
     (if (string-match "^\\(.*\\)\\.\\(ml\\|mli\\)$" name)
-       (find-file
-        (concat
-         (caml-match-string 1 name)
-         (if (string= "ml" (caml-match-string 2 name)) ".mli" ".ml"))))))
+        (find-file
+         (concat
+          (caml-match-string 1 name)
+          (if (string= "ml" (caml-match-string 2 name)) ".mli" ".ml"))))))
 
 ;;; subshell support
 
@@ -496,32 +496,32 @@ have caml-electric-indent on, which see.")
 
 (defconst caml-imenu-search-regexp
   (concat "\\<in\\>\\|"
-         "^[ \t]*\\(let\\|class\\|type\\|m\\(odule\\|ethod\\)"
-         "\\|functor\\|and\\|val\\)[ \t]+"
-         "\\(\\('[a-zA-Z0-9]+\\|([^)]+)"
-         "\\|mutable\\|private\\|rec\\|type\\)[ \t]+\\)?"
-         "\\([a-zA-Z][a-zA-Z0-9_']*\\)"))
+          "^[ \t]*\\(let\\|class\\|type\\|m\\(odule\\|ethod\\)"
+          "\\|functor\\|and\\|val\\)[ \t]+"
+          "\\(\\('[a-zA-Z0-9]+\\|([^)]+)"
+          "\\|mutable\\|private\\|rec\\|type\\)[ \t]+\\)?"
+          "\\([a-zA-Z][a-zA-Z0-9_']*\\)"))
 (defun caml-prev-index-position-function ()
   (let (found data)
     (while (and (setq found
-                     (re-search-backward caml-imenu-search-regexp nil 'move))
-               (progn (setq data (match-data)) t)
-               (or (caml-in-literal-p)
-                   (caml-in-comment-p)
-                   (if (looking-at "in") (caml-find-in-match)))))
+                      (re-search-backward caml-imenu-search-regexp nil 'move))
+                (progn (setq data (match-data)) t)
+                (or (caml-in-literal-p)
+                    (caml-in-comment-p)
+                    (if (looking-at "in") (caml-find-in-match)))))
     (set-match-data data)
     found))
 (defun caml-create-index-function ()
   (let (value-alist
-       type-alist
-       class-alist
-       method-alist
-       module-alist
-       and-alist
-       all-alist
-       menu-alist
-       (prev-pos (point-max))
-       index)
+        type-alist
+        class-alist
+        method-alist
+        module-alist
+        and-alist
+        all-alist
+        menu-alist
+        (prev-pos (point-max))
+        index)
     (goto-char prev-pos)
     (imenu-progress-message prev-pos 0 t)
     ;; collect definitions
@@ -531,31 +531,31 @@ have caml-electric-indent on, which see.")
       (setq all-alist (cons index all-alist))
       (cond
        ((looking-at "[ \t]*and")
-       (setq and-alist (cons index and-alist)))
+        (setq and-alist (cons index and-alist)))
        ((looking-at "[ \t]*let")
-       (setq value-alist (cons index (append and-alist value-alist)))
-       (setq and-alist nil))
+        (setq value-alist (cons index (append and-alist value-alist)))
+        (setq and-alist nil))
        ((looking-at "[ \t]*type")
-       (setq type-alist (cons index (append and-alist type-alist)))
-       (setq and-alist nil))
+        (setq type-alist (cons index (append and-alist type-alist)))
+        (setq and-alist nil))
        ((looking-at "[ \t]*class")
-       (setq class-alist (cons index (append and-alist class-alist)))
-       (setq and-alist nil))
+        (setq class-alist (cons index (append and-alist class-alist)))
+        (setq and-alist nil))
        ((looking-at "[ \t]*val")
-       (setq value-alist (cons index value-alist)))
+        (setq value-alist (cons index value-alist)))
        ((looking-at "[ \t]*\\(module\\|functor\\)")
-       (setq module-alist (cons index module-alist)))
+        (setq module-alist (cons index module-alist)))
        ((looking-at "[ \t]*method")
-       (setq method-alist (cons index method-alist)))))
+        (setq method-alist (cons index method-alist)))))
     ;; build menu
     (mapcar
      '(lambda (pair)
-       (if (symbol-value (cdr pair))
-           (setq menu-alist
-                 (cons
-                  (cons (car pair)
-                        (sort (symbol-value (cdr pair)) 'imenu--sort-by-name))
-                  menu-alist))))
+        (if (symbol-value (cdr pair))
+            (setq menu-alist
+                  (cons
+                   (cons (car pair)
+                         (sort (symbol-value (cdr pair)) 'imenu--sort-by-name))
+                   menu-alist))))
      '(("Values" . value-alist)
        ("Types" . type-alist)
        ("Modules" . module-alist)
@@ -588,12 +588,12 @@ the line all the way to where point is."
    ((and p (> p 1)) (indent-line-to (current-column)))
    ((caml-in-indentation) (indent-line-to (caml-compute-final-indent)))
    (t (save-excursion
-       (indent-line-to
-        (caml-compute-final-indent))))))
-   
+        (indent-line-to
+         (caml-compute-final-indent))))))
+
 (defun caml-unindent-command ()
 
-  "Decrease indentation by one level in Caml mode.  
+  "Decrease indentation by one level in Caml mode.
 
 Works only if the point is at the beginning of an indented line
 \(i.e. all characters between beginning of line and point are
@@ -625,12 +625,12 @@ variable caml-mode-indentation."
       (if (> l 1) (- l 1) l)))
   (defun forward-byte (count)
     (if (> count 0)
-       (while (> count 0)
-         (setq count (- count (caml-char-bytes (char-after))))
-         (forward-char))
+        (while (> count 0)
+          (setq count (- count (caml-char-bytes (char-after))))
+          (forward-char))
       (while (< count 0)
-       (setq count (+ count (caml-char-bytes (char-before))))
-       (backward-char)))))
+        (setq count (+ count (caml-char-bytes (char-before))))
+        (backward-char)))))
 
 (require 'compile)
 
@@ -665,7 +665,7 @@ from an error message produced by camlc.")
 ;;forward n errors, not reparse.
 
 ;itz 04-21-96 instead of defining a new function, use defadvice
-;that way we get our effect even when we do \C-x` in compilation buffer  
+;that way we get our effect even when we do \C-x` in compilation buffer
 
 (defadvice next-error (after caml-next-error activate)
  "Reads the extra positional information provided by the Caml compiler.
@@ -677,38 +677,38 @@ possible."
  (if (eq major-mode 'caml-mode)
      (let (bol beg end)
        (save-excursion
-        (set-buffer
-         (if (boundp 'compilation-last-buffer) 
-             compilation-last-buffer   ;Emacs 19
-           "*compilation*"))           ;Emacs 18
-        (save-excursion
-          (goto-char (window-point (get-buffer-window (current-buffer))))
-          (if (looking-at caml-error-chars-regexp)
-              (setq beg
-                    (string-to-int
-                     (buffer-substring (match-beginning 1) (match-end 1)))
-                    end
-                    (string-to-int
-                     (buffer-substring (match-beginning 2) (match-end 2)))))))
+         (set-buffer
+          (if (boundp 'compilation-last-buffer)
+              compilation-last-buffer   ;Emacs 19
+            "*compilation*"))           ;Emacs 18
+         (save-excursion
+           (goto-char (window-point (get-buffer-window (current-buffer))))
+           (if (looking-at caml-error-chars-regexp)
+               (setq beg
+                     (string-to-int
+                      (buffer-substring (match-beginning 1) (match-end 1)))
+                     end
+                     (string-to-int
+                      (buffer-substring (match-beginning 2) (match-end 2)))))))
        (cond (beg
-             (setq end (- end beg))
+              (setq end (- end beg))
               (beginning-of-line)
-             (forward-byte beg)
-             (setq beg (point))
-             (forward-byte end)
-             (setq end (point))
-             (goto-char beg)
-             (push-mark end t)
-             (cond ((fboundp 'make-overlay)
-                    (if caml-error-overlay ()
-                      (setq caml-error-overlay (make-overlay 1 1))
-                      (overlay-put caml-error-overlay 'face 'region))
-                    (unwind-protect
-                        (progn
-                          (move-overlay caml-error-overlay
-                                        beg end (current-buffer))
-                          (sit-for 60))
-                      (delete-overlay caml-error-overlay)))))))))
+              (forward-byte beg)
+              (setq beg (point))
+              (forward-byte end)
+              (setq end (point))
+              (goto-char beg)
+              (push-mark end t)
+              (cond ((fboundp 'make-overlay)
+                     (if caml-error-overlay ()
+                       (setq caml-error-overlay (make-overlay 1 1))
+                       (overlay-put caml-error-overlay 'face 'region))
+                     (unwind-protect
+                         (progn
+                           (move-overlay caml-error-overlay
+                                         beg end (current-buffer))
+                           (sit-for 60))
+                       (delete-overlay caml-error-overlay)))))))))
 
 ;; Usual match-string doesn't work properly with font-lock-mode
 ;; on some emacs.
@@ -723,8 +723,8 @@ pairs.  Zero means the entire text matched by the whole 
regexp or
 whole string."
 
   (let* ((data (match-data))
-        (begin (nth (* 2 num) data))
-        (end (nth (1+ (* 2 num)) data)))
+         (begin (nth (* 2 num) data))
+         (end (nth (1+ (* 2 num)) data)))
     (if string (substring string begin end)
       (buffer-substring-no-properties begin end))))
 
@@ -743,14 +743,14 @@ whole string."
 
 (defconst caml-phrase-start-keywords
   (concat "\\<\\(class\\|ex\\(ternal\\|ception\\)\\|functor"
-         "\\|let\\|module\\|open\\|type\\|val\\)\\>")
+          "\\|let\\|module\\|open\\|type\\|val\\)\\>")
   "Keywords starting phrases in files")
 
 ;; a phrase starts when a toplevel keyword is at the beginning of a line
 (defun caml-at-phrase-start-p ()
   (and (bolp)
        (or (looking-at "#")
-          (looking-at caml-phrase-start-keywords))))
+           (looking-at caml-phrase-start-keywords))))
 
 (defun caml-mark-phrase ()
   "Put mark at end of this Caml phrase, point at beginning.
@@ -765,13 +765,13 @@ eventually added when sending to the subprocess."
     (if (and (looking-at ";;") (not (caml-in-comment-p))) nil
       (if (caml-at-phrase-start-p) (forward-char))
       (while (and (cond
-                  ((re-search-forward
-                    (concat ";;\\|" caml-phrase-start-keywords) nil 'move)
-                   (goto-char (match-beginning 0)) t))
-                 (or (not (or (bolp) (looking-at ";;")))
-                     (caml-in-comment-p)
-                     (caml-in-literal-p)))
-       (forward-char)))
+                   ((re-search-forward
+                     (concat ";;\\|" caml-phrase-start-keywords) nil 'move)
+                    (goto-char (match-beginning 0)) t))
+                  (or (not (or (bolp) (looking-at ";;")))
+                      (caml-in-comment-p)
+                      (caml-in-literal-p)))
+        (forward-char)))
     (setq use-semi (looking-at ";;"))
     (skip-chars-backward " \n\t")
     (while (and (eq (preceding-char) ?\)) (eq (char-after (- (point) 2)) ?*))
@@ -783,19 +783,19 @@ eventually added when sending to the subprocess."
     (cond
      (use-semi
       (if (caml-find-kwop ";;") (forward-char 2)
-       (goto-char (point-min)))
+        (goto-char (point-min)))
       (skip-chars-forward " \n\t")
       (while (or (looking-at comment-start-skip) (caml-in-comment-p))
-       (if (= (following-char) ?\)) (forward-char)
-         (search-forward comment-end))
-       (skip-chars-forward " \n\t")))
+        (if (= (following-char) ?\)) (forward-char)
+          (search-forward comment-end))
+        (skip-chars-forward " \n\t")))
      (t
       (if (not (caml-find-kwop caml-phrase-start-keywords))
-         (error "No phrase preceding point"))
+          (error "No phrase preceding point"))
       (while (and (or (not (bolp))
-                     (caml-in-comment-p)
-                     (caml-in-literal-p))
-                 (caml-find-kwop caml-phrase-start-keywords)))))
+                      (caml-in-comment-p)
+                      (caml-in-literal-p))
+                  (caml-find-kwop caml-phrase-start-keywords)))))
     (cons (point) end)))
 
 ;;itz Fri Sep 25 12:58:13 PDT 1998 support for adding change-log entries
@@ -842,44 +842,44 @@ eventually added when sending to the subprocess."
 ;this clears the last comment cache if necessary
 (defun caml-before-change-function (begin end)
   (if (and caml-last-noncomment-pos
-          (> caml-last-noncomment-pos begin))
+           (> caml-last-noncomment-pos begin))
       (setq caml-last-noncomment-pos nil))
   (if (and (marker-position caml-last-comment-start)
-          (marker-position caml-last-comment-end)
-          (caml-overlap begin end
-                        caml-last-comment-start
-                        caml-last-comment-end))
+           (marker-position caml-last-comment-end)
+           (caml-overlap begin end
+                         caml-last-comment-start
+                         caml-last-comment-end))
       (prog2
-         (set-marker caml-last-comment-start nil)
-         (set-marker caml-last-comment-end nil)))
+          (set-marker caml-last-comment-start nil)
+          (set-marker caml-last-comment-end nil)))
   (let ((orig-function (default-value 'before-change-function)))
     (if orig-function (funcall orig-function begin end))))
 
 (defun caml-in-literal-p ()
   "Returns non-nil if point is inside a caml literal."
   (let* ((start-literal (concat "[\"" caml-quote-char "]"))
-        (char-literal
-         (concat "\\([^\\]\\|\\\\\\.\\|\\\\[0-9][0-9][0-9]\\)"
-                 caml-quote-char))
-        (pos (point))
-        (eol (progn (end-of-line 1) (point)))
-        state in-str)
+         (char-literal
+          (concat "\\([^\\]\\|\\\\\\.\\|\\\\[0-9][0-9][0-9]\\)"
+                  caml-quote-char))
+         (pos (point))
+         (eol (progn (end-of-line 1) (point)))
+         state in-str)
     (beginning-of-line 1)
     (while (and (not state)
-               (re-search-forward start-literal eol t)
-               (<= (point) pos))
+                (re-search-forward start-literal eol t)
+                (<= (point) pos))
       (cond
        ((string= (caml-match-string 0) "\"")
-       (setq in-str t)
-       (while (and in-str (not state)
-                   (re-search-forward "\"\\|\\\\\"" eol t))
-         (if (> (point) pos) (setq state t))
-         (if (string= (caml-match-string 0) "\"") (setq in-str nil)))
-       (if in-str (setq state t)))
+        (setq in-str t)
+        (while (and in-str (not state)
+                    (re-search-forward "\"\\|\\\\\"" eol t))
+          (if (> (point) pos) (setq state t))
+          (if (string= (caml-match-string 0) "\"") (setq in-str nil)))
+        (if in-str (setq state t)))
        ((looking-at char-literal)
-       (if (and (>= pos (match-beginning 0)) (< pos (match-end 0)))
-           (setq state t)
-         (goto-char (match-end 0))))))
+        (if (and (>= pos (match-beginning 0)) (< pos (match-end 0)))
+            (setq state t)
+          (goto-char (match-end 0))))))
     (goto-char pos)
     state))
 
@@ -888,15 +888,15 @@ eventually added when sending to the subprocess."
   (let ((count 1) match)
     (while (> count 0)
       (if (not (re-search-forward "(\\*\\|\\*)" nil 'move))
-         (setq count -1)
-       (setq match (caml-match-string 0))
-       (cond
-        ((caml-in-literal-p)
-         nil)
-        ((string= match comment-start)
-         (setq count (1+ count)))
-        (t
-         (setq count (1- count))))))
+          (setq count -1)
+        (setq match (caml-match-string 0))
+        (cond
+         ((caml-in-literal-p)
+          nil)
+         ((string= match comment-start)
+          (setq count (1+ count)))
+         (t
+          (setq count (1- count))))))
     (= count 0)))
 
 (defun caml-backward-comment ()
@@ -904,15 +904,15 @@ eventually added when sending to the subprocess."
   (let ((count 1) match)
     (while (> count 0)
       (if (not (re-search-backward "(\\*\\|\\*)" nil 'move))
-         (setq count -1)
-       (setq match (caml-match-string 0))
-       (cond
-        ((caml-in-literal-p)
-         nil)
-        ((string= match comment-start)
-         (setq count (1- count)))
-        (t
-         (setq count (1+ count))))))
+          (setq count -1)
+        (setq match (caml-match-string 0))
+        (cond
+         ((caml-in-literal-p)
+          nil)
+         ((string= match comment-start)
+          (setq count (1- count)))
+         (t
+          (setq count (1+ count))))))
     (= count 0)))
 
 (defun caml-in-comment-p ()
@@ -926,57 +926,57 @@ Returns nil for the parenthesis openning a comment."
   ;;have to account for that possibility in comments.
   (save-excursion
     (let* ((cached-pos caml-last-noncomment-pos)
-          (cached-begin (marker-position caml-last-comment-start))
-          (cached-end (marker-position caml-last-comment-end)))
+           (cached-begin (marker-position caml-last-comment-start))
+           (cached-end (marker-position caml-last-comment-end)))
       (cond
        ((and cached-begin cached-end
-            (< cached-begin (point)) (< (point) cached-end)) t)
+             (< cached-begin (point)) (< (point) cached-end)) t)
        ((and cached-pos (= cached-pos (point))) nil)
        ((and cached-pos (> cached-pos (point))
-            (< (abs (- cached-pos (point))) caml-lookback-limit))
-       (let (end found (here (point)))
-         ; go back to somewhere sure
-         (goto-char cached-pos)
-         (while (> (point) here)
-           ; look for the end of a comment
-           (while (and (if (search-backward comment-end (1- here) 'move)
-                           (setq end (match-end 0))
-                         (setq end nil))
-                       (caml-in-literal-p)))
-           (if end (setq found (caml-backward-comment))))
-         (if (and found (= (point) here)) (setq end nil))
-         (if (not end)
-             (setq caml-last-noncomment-pos here)
-           (set-marker caml-last-comment-start (point))
-           (set-marker caml-last-comment-end end))
-         end))     
+             (< (abs (- cached-pos (point))) caml-lookback-limit))
+        (let (end found (here (point)))
+          ; go back to somewhere sure
+          (goto-char cached-pos)
+          (while (> (point) here)
+            ; look for the end of a comment
+            (while (and (if (search-backward comment-end (1- here) 'move)
+                            (setq end (match-end 0))
+                          (setq end nil))
+                        (caml-in-literal-p)))
+            (if end (setq found (caml-backward-comment))))
+          (if (and found (= (point) here)) (setq end nil))
+          (if (not end)
+              (setq caml-last-noncomment-pos here)
+            (set-marker caml-last-comment-start (point))
+            (set-marker caml-last-comment-end end))
+          end))
        (t
-       (let (begin found (here (point)))
-         ; go back to somewhere sure (or far enough)
-         (goto-char
-          (if cached-pos cached-pos (- (point) caml-lookback-limit)))
-         (while (< (point) here)
-           ; look for the beginning of a comment
-           (while (and (if (search-forward comment-start (1+ here) 'move)
-                           (setq begin (match-beginning 0))
-                         (setq begin nil))
-                       (caml-in-literal-p)))
-           (if begin (setq found (caml-forward-comment))))
-         (if (and found (= (point) here)) (setq begin nil))
-         (if (not begin)
-             (setq caml-last-noncomment-pos here)
-           (set-marker caml-last-comment-start begin)
-           (set-marker caml-last-comment-end (point)))
-         begin))))))
+        (let (begin found (here (point)))
+          ; go back to somewhere sure (or far enough)
+          (goto-char
+           (if cached-pos cached-pos (- (point) caml-lookback-limit)))
+          (while (< (point) here)
+            ; look for the beginning of a comment
+            (while (and (if (search-forward comment-start (1+ here) 'move)
+                            (setq begin (match-beginning 0))
+                          (setq begin nil))
+                        (caml-in-literal-p)))
+            (if begin (setq found (caml-forward-comment))))
+          (if (and found (= (point) here)) (setq begin nil))
+          (if (not begin)
+              (setq caml-last-noncomment-pos here)
+            (set-marker caml-last-comment-start begin)
+            (set-marker caml-last-comment-end (point)))
+          begin))))))
 
 (defconst caml-before-expr-prefix
   (concat "\\<\\(asr\\|begin\\|class\\|do\\(wnto\\)?\\|else"
-         "\\|i\\(f\\|n\\(herit\\|itializer\\)?\\)"
-         "\\|f\\(or\\|un\\(ct\\(ion\\|or\\)\\)?\\)"
-         "\\|l\\(and\\|or\\|s[lr]\\|xor\\)\\|m\\(atch\\|od\\)"
-         "\\|o[fr]\\|parser\\|s\\(ig\\|truct\\)\\|t\\(hen\\|o\\|ry\\)"
-         "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>\\|:begin\\>"
-         "\\|[=<>@^|&+-*/$%][!$%*+-./:<=>?@^|~]*\\|:[:=]\\|[[({,;]")
+          "\\|i\\(f\\|n\\(herit\\|itializer\\)?\\)"
+          "\\|f\\(or\\|un\\(ct\\(ion\\|or\\)\\)?\\)"
+          "\\|l\\(and\\|or\\|s[lr]\\|xor\\)\\|m\\(atch\\|od\\)"
+          "\\|o[fr]\\|parser\\|s\\(ig\\|truct\\)\\|t\\(hen\\|o\\|ry\\)"
+          "\\|w\\(h\\(en\\|ile\\)\\|ith\\)\\)\\>\\|:begin\\>"
+          "\\|[=<>@^|&+-*/$%][!$%*+-./:<=>?@^|~]*\\|:[:=]\\|[[({,;]")
 
   "Keywords that may appear immediately before an expression.
 Used to distinguish it from toplevel let construct.")
@@ -985,8 +985,8 @@ Used to distinguish it from toplevel let construct.")
   (let ((pos (point)) (in-expr t))
     (caml-find-kwop
      (concat caml-before-expr-prefix "\\|"
-            caml-matching-kw-regexp "\\|"
-            (aref caml-kwop-regexps caml-max-indent-priority)))
+             caml-matching-kw-regexp "\\|"
+             (aref caml-kwop-regexps caml-max-indent-priority)))
     (cond
      ; special case for ;;
      ((and (= (preceding-char) ?\;) (= (following-char) ?\;)))
@@ -994,9 +994,9 @@ Used to distinguish it from toplevel let construct.")
       (goto-char (match-end 0))
       (skip-chars-forward " \t\n")
       (while (looking-at "(\\*")
-       (forward-char)
-       (caml-forward-comment)
-       (skip-chars-forward " \t\n"))
+        (forward-char)
+        (caml-forward-comment)
+        (skip-chars-forward " \t\n"))
       (if (<= pos (point)) (setq in-expr nil))))
     (goto-char pos)
     in-expr))
@@ -1014,26 +1014,26 @@ values: the actual text of the keyword or operator, and 
a boolean
 indicating whether the keyword was one we looked for explicitly
 {non-nil}, or on the other hand one of the block-terminating
 keywords."
-  
+
   (let ((start-literal (concat "[\"" caml-quote-char "]"))
-       found kwop)
+        found kwop)
     (progn
       (while (and (not found)
-                 (re-search-backward kwop-regexp nil t))
-       (setq kwop (caml-match-string 0))
-       (cond
-        ((looking-at "(\\*")
-         (backward-char))
-        ((caml-in-comment-p)
-         (search-backward "(" nil 'move))
-        ((looking-at start-literal))
-        ((caml-in-literal-p)
-         (re-search-backward start-literal))  ;ugly hack
-        ((setq found t)))))
+                  (re-search-backward kwop-regexp nil t))
+        (setq kwop (caml-match-string 0))
+        (cond
+         ((looking-at "(\\*")
+          (backward-char))
+         ((caml-in-comment-p)
+          (search-backward "(" nil 'move))
+         ((looking-at start-literal))
+         ((caml-in-literal-p)
+          (re-search-backward start-literal))  ;ugly hack
+         ((setq found t)))))
     (if found
-       (if (not (string-match "\\`[^|[]|[^]|]?\\'" kwop)) ;arrrrgh!!
-           kwop
-         (forward-char 1) "|") nil)))
+        (if (not (string-match "\\`[^|[]|[^]|]?\\'" kwop)) ;arrrrgh!!
+            kwop
+          (forward-char 1) "|") nil)))
 
 ;  Association list of indentation values based on governing keywords.
 ;
@@ -1046,45 +1046,45 @@ keywords."
 (defconst caml-no-indent 0)
 
 (defconst caml-kwop-alist
-  '(("begin"           nil     6       caml-begin-indent)
-    (":begin"          nil     6       caml-begin-indent) ; hack
-    ("class"           nil     0       caml-class-indent)
-    ("constraint"      nil     0       caml-val-indent)
-    ("sig"             nil     1       caml-sig-indent)
-    ("struct"          nil     1       caml-struct-indent)
-    ("exception"       nil     0       caml-exception-indent)
-    ("for"             nil     6       caml-for-indent)
-    ("fun"             nil     3       caml-fun-indent)
-    ("function"                nil     3       caml-function-indent)
-    ("if"              nil     6       caml-if-indent)
-    ("if-else"         nil     6       caml-if-else-indent)
-    ("include"         nil     0       caml-include-indent)
-    ("inherit"         nil     0       caml-inherit-indent)
-    ("initializer"     nil     0       caml-initializer-indent)
-    ("let"             nil     6       caml-let-indent)
-    ("let-in"          nil     6       caml-let-in-indent)
-    ("match"           nil     6       caml-match-indent)
-    ("method"          nil     0       caml-method-indent)
-    ("module"          nil     0       caml-module-indent)
-    ("object"          nil     6       caml-object-indent)
-    ("of"              nil     7       caml-of-indent)
-    ("open"            nil     0       caml-no-indent)
-    ("parser"          nil     3       caml-parser-indent)
-    ("try"             nil     6       caml-try-indent)
-    ("type"            nil     0       caml-type-indent)
-    ("val"             nil     0       caml-val-indent)
-    ("when"            nil     2       caml-if-indent)
-    ("while"           nil     6       caml-while-indent)
-    ("::"              t       5       caml-::-indent)
-    ("@"               t       4       caml-@-indent)
-    ("^"               t       4       caml-@-indent)
-    (":="              nil     3       caml-:=-indent)
-    ("<-"              nil     3       caml-<--indent)
-    ("->"              nil     2       caml-->-indent)
-    ("\["              t       8       caml-lb-indent)
-    ("{"               t       8       caml-lc-indent)
-    ("\("              t       8       caml-lp-indent)
-    ("|"               nil     2       caml-no-indent))
+  '(("begin"            nil     6       caml-begin-indent)
+    (":begin"           nil     6       caml-begin-indent) ; hack
+    ("class"            nil     0       caml-class-indent)
+    ("constraint"       nil     0       caml-val-indent)
+    ("sig"              nil     1       caml-sig-indent)
+    ("struct"           nil     1       caml-struct-indent)
+    ("exception"        nil     0       caml-exception-indent)
+    ("for"              nil     6       caml-for-indent)
+    ("fun"              nil     3       caml-fun-indent)
+    ("function"         nil     3       caml-function-indent)
+    ("if"               nil     6       caml-if-indent)
+    ("if-else"          nil     6       caml-if-else-indent)
+    ("include"          nil     0       caml-include-indent)
+    ("inherit"          nil     0       caml-inherit-indent)
+    ("initializer"      nil     0       caml-initializer-indent)
+    ("let"              nil     6       caml-let-indent)
+    ("let-in"           nil     6       caml-let-in-indent)
+    ("match"            nil     6       caml-match-indent)
+    ("method"           nil     0       caml-method-indent)
+    ("module"           nil     0       caml-module-indent)
+    ("object"           nil     6       caml-object-indent)
+    ("of"               nil     7       caml-of-indent)
+    ("open"             nil     0       caml-no-indent)
+    ("parser"           nil     3       caml-parser-indent)
+    ("try"              nil     6       caml-try-indent)
+    ("type"             nil     0       caml-type-indent)
+    ("val"              nil     0       caml-val-indent)
+    ("when"             nil     2       caml-if-indent)
+    ("while"            nil     6       caml-while-indent)
+    ("::"               t       5       caml-::-indent)
+    ("@"                t       4       caml-@-indent)
+    ("^"                t       4       caml-@-indent)
+    (":="               nil     3       caml-:=-indent)
+    ("<-"               nil     3       caml-<--indent)
+    ("->"               nil     2       caml-->-indent)
+    ("\["               t       8       caml-lb-indent)
+    ("{"                t       8       caml-lc-indent)
+    ("\("               t       8       caml-lp-indent)
+    ("|"                nil     2       caml-no-indent))
 ; if-else and let-in are not keywords but idioms
 ; "|" is not in the regexps
 ; all these 3 values correspond to hard-coded names
@@ -1105,7 +1105,7 @@ the line where the governing keyword occurs.")
   "Array of regexps representing caml keywords of different priorities.")
 
 (aset caml-kwop-regexps 0
-      (concat 
+      (concat
        "\\<\\(begin\\|object\\|for\\|s\\(ig\\|truct\\)\\|while\\)\\>"
        "\\|:begin\\>\\|[[({]"))
 (aset caml-kwop-regexps 1
@@ -1142,13 +1142,13 @@ the line where the governing keyword occurs.")
        ((string= kwop "done") (setq unbalanced (1+ unbalanced)))
        (t (setq unbalanced (1- unbalanced)))))
     kwop))
-      
+
 (defun caml-find-end-match ()
   (let ((unbalanced 1) (kwop t))
     (while (and (not (= 0 unbalanced)) kwop)
       (setq kwop
-           (caml-find-kwop
-            
"\\<\\(end\\|begin\\|object\\|s\\(ig\\|truct\\)\\)\\>\\|:begin\\>\\|;;"))
+            (caml-find-kwop
+             
"\\<\\(end\\|begin\\|object\\|s\\(ig\\|truct\\)\\)\\>\\|:begin\\>\\|;;"))
       (cond
        ((not kwop))
        ((string= kwop ";;") (setq kwop nil) (forward-line 1))
@@ -1166,79 +1166,79 @@ the line where the governing keyword occurs.")
        ((string= kwop "in") (setq unbalanced (1+ unbalanced)))
        ( t (setq unbalanced (1- unbalanced)))))
     kwop))
-  
+
 (defun caml-find-with-match ()
   (let ((unbalanced 1) (kwop t))
     (while (and (not (= 0 unbalanced)) kwop)
       (setq kwop
-           (caml-find-kwop
-            "\\<\\(with\\|try\\|m\\(atch\\|odule\\)\\|functor\\)\\>\\|{\\|}"))
+            (caml-find-kwop
+             "\\<\\(with\\|try\\|m\\(atch\\|odule\\)\\|functor\\)\\>\\|{\\|}"))
       (cond
        ((not kwop))
        ((or (string= kwop "module") (string= kwop "functor"))
-       (setq unbalanced 0))
+        (setq unbalanced 0))
        ((or (string= kwop "with") (string= kwop "}"))
-       (setq unbalanced (1+ unbalanced)))
+        (setq unbalanced (1+ unbalanced)))
        (t (setq unbalanced (1- unbalanced)))))
     kwop))
 
 (defun caml-find-paren-match (close)
   (let ((unbalanced 1)
-       (regexp (cond ((= close ?\)) "[()]")
-                     ((= close ?\]) "[][]")
-                     ((= close ?\}) "[{}]"))))
+        (regexp (cond ((= close ?\)) "[()]")
+                      ((= close ?\]) "[][]")
+                      ((= close ?\}) "[{}]"))))
     (while (and (> unbalanced 0)
-               (caml-find-kwop regexp))
+                (caml-find-kwop regexp))
       (if (= close (following-char))
-         (setq unbalanced (1+ unbalanced))
-       (setq unbalanced (1- unbalanced))))))
+          (setq unbalanced (1+ unbalanced))
+        (setq unbalanced (1- unbalanced))))))
 
 (defun caml-find-then-match (&optional from-else)
   (let ((bol (if from-else
-                (save-excursion
-                  (progn (beginning-of-line) (point)))))
-       kwop done matching-fun)
+                 (save-excursion
+                   (progn (beginning-of-line) (point)))))
+        kwop done matching-fun)
     (while (not done)
       (setq kwop (caml-find-kwop
-                 "\\<\\(e\\(nd\\|lse\\)\\|done\\|then\\|if\\)\\>\\|[])};]"))
+                  "\\<\\(e\\(nd\\|lse\\)\\|done\\|then\\|if\\)\\>\\|[])};]"))
       (cond
        ((not kwop) (setq done t))
        ((caml-at-sexp-close-p)
-       (caml-find-paren-match (following-char)))
+        (caml-find-paren-match (following-char)))
        ((string= kwop "if") (setq done t))
        ((string= kwop "then")
-       (if (not from-else) (setq kwop (caml-find-then-match))))
+        (if (not from-else) (setq kwop (caml-find-then-match))))
        ((setq matching-fun (cdr-safe (assoc kwop caml-matching-kw-alist)))
-       (setq kwop (funcall matching-fun)))
+        (setq kwop (funcall matching-fun)))
        ((string= kwop "then")
-       (if (not from-else) (setq kwop (caml-find-then-match))))))
+        (if (not from-else) (setq kwop (caml-find-then-match))))))
     (if (and bol (>= (point) bol))
-       "if-else"
+        "if-else"
       kwop)))
 
 (defun caml-find-pipe-match ()
   (let ((done nil) (kwop)
-       (re (concat
-            "\\<\\(try\\|match\\|with\\|function\\|parser\\|type"
-            "\\|e\\(nd\\|lse\\)\\|done\\|then\\|in\\)\\>"
-            "\\|[^[|]|\\|[])}]")))
+        (re (concat
+             "\\<\\(try\\|match\\|with\\|function\\|parser\\|type"
+             "\\|e\\(nd\\|lse\\)\\|done\\|then\\|in\\)\\>"
+             "\\|[^[|]|\\|[])}]")))
     (while (not done)
       (setq kwop (caml-find-kwop re))
       (cond
        ((not kwop) (setq done t))
        ((looking-at "[^[|]\\(|\\)")
-       (goto-char (match-beginning 1))
-       (setq kwop "|")
-       (setq done t))
+        (goto-char (match-beginning 1))
+        (setq kwop "|")
+        (setq done t))
        ((caml-at-sexp-close-p)
-       (caml-find-paren-match (following-char)))
+        (caml-find-paren-match (following-char)))
        ((string= kwop "with")
-       (setq kwop (caml-find-with-match))
-       (setq done t))
+        (setq kwop (caml-find-with-match))
+        (setq done t))
        ((string= kwop "parser")
-       (if (re-search-backward "\\<with\\>" (- (point) 5) t)
-           (setq kwop (caml-find-with-match)))
-       (setq done t))
+        (if (re-search-backward "\\<with\\>" (- (point) 5) t)
+            (setq kwop (caml-find-with-match)))
+        (setq done t))
        ((string= kwop "done") (caml-find-done-match))
        ((string= kwop "end") (caml-find-end-match))
        ((string= kwop "then") (caml-find-then-match))
@@ -1251,7 +1251,7 @@ the line where the governing keyword occurs.")
   (let ((done nil) (kwop))
     (while (not done)
       (setq kwop (caml-find-kwop
-                 "\\<\\(object\\|exception\\|let\\|type\\|end\\|in\\)\\>"))
+                  "\\<\\(object\\|exception\\|let\\|type\\|end\\|in\\)\\>"))
       (cond
        ((not kwop) (setq done t))
        ((string= kwop "end") (caml-find-end-match))
@@ -1296,46 +1296,46 @@ the line where the governing keyword occurs.")
  Skip nested blocks."
 
   (let ((done nil) (kwop nil) (matching-fun)
-       (kwop-list (aref caml-kwop-regexps prio)))
+        (kwop-list (aref caml-kwop-regexps prio)))
     (while (not done)
       (setq kwop (caml-find-kwop
-                 (concat caml-matching-kw-regexp
-                         (cond ((> prio 3) "\\|[])},;]\\|")
-                               ((> prio 2) "\\|[])};]\\|")
-                               (t "\\|[])}]\\|"))
-                         kwop-list)))
+                  (concat caml-matching-kw-regexp
+                          (cond ((> prio 3) "\\|[])},;]\\|")
+                                ((> prio 2) "\\|[])};]\\|")
+                                (t "\\|[])}]\\|"))
+                          kwop-list)))
       (cond
        ((not kwop) (setq done t))
        ((caml-at-sexp-close-p)
-       (caml-find-paren-match (following-char)))
+        (caml-find-paren-match (following-char)))
        ((and (>= prio 2) (string= kwop "|")) (setq done t))
        ((string= kwop "end") (caml-find-end-match))
        ((string= kwop "done") (caml-find-done-match))
        ((string= kwop "in")
-       (cond ((and (caml-find-in-match) (>= prio 2))
-              (setq kwop "let-in")
-              (setq done t))))
+        (cond ((and (caml-find-in-match) (>= prio 2))
+               (setq kwop "let-in")
+               (setq done t))))
        ((and (string= kwop "parser") (>= prio 2)
-            (re-search-backward "\\<with\\>" (- (point) 5) t))
-       (setq kwop (caml-find-with-match))
-       (setq done t))
+             (re-search-backward "\\<with\\>" (- (point) 5) t))
+        (setq kwop (caml-find-with-match))
+        (setq done t))
        ((setq matching-fun (cdr-safe (assoc kwop caml-matching-kw-alist)))
-       (setq kwop (funcall matching-fun))
-       (if (looking-at kwop-list) (setq done t)))
+        (setq kwop (funcall matching-fun))
+        (if (looking-at kwop-list) (setq done t)))
        (t (let* ((kwop-info (assoc kwop caml-kwop-alist))
-                (is-op (and (nth 1 kwop-info)
-                            ; check that we are not at beginning of line
-                            (let ((pos (point)) bti)
-                              (back-to-indentation)
-                              (setq bti (point))
-                              (goto-char pos)
-                              (< bti pos)))))
-           (if (and is-op (looking-at 
-                           (concat (regexp-quote kwop)
-                                   "|?[ \t]*\\(\n\\|(\\*\\)")))
-               (setq kwop-list
-                     (aref caml-kwop-regexps (nth 2 kwop-info)))
-             (setq done t))))))
+                 (is-op (and (nth 1 kwop-info)
+                             ; check that we are not at beginning of line
+                             (let ((pos (point)) bti)
+                               (back-to-indentation)
+                               (setq bti (point))
+                               (goto-char pos)
+                               (< bti pos)))))
+            (if (and is-op (looking-at
+                            (concat (regexp-quote kwop)
+                                    "|?[ \t]*\\(\n\\|(\\*\\)")))
+                (setq kwop-list
+                      (aref caml-kwop-regexps (nth 2 kwop-info)))
+              (setq done t))))))
     kwop))
 
 (defun caml-compute-basic-indent (prio)
@@ -1345,48 +1345,48 @@ Find the `governing node' for current line. Compute 
desired
 indentation based on the node and the indentation alists.
 Assumes point is exactly at line indentation.
 Does not preserve point."
-  
+
   (let* (in-expr
-        (kwop (cond
-               ((looking-at "|\\([^]|]\\|\\'\\)")
-                (caml-find-pipe-match))
-               ((and (looking-at caml-phrase-start-keywords)
-                     (caml-in-expr-p))
-                (caml-find-end-match))
-               ((and (looking-at caml-matching-kw-regexp)
-                     (assoc (caml-match-string 0) caml-matching-kw-alist))
-                (funcall (cdr-safe (assoc (caml-match-string 0)
-                                     caml-matching-kw-alist))))
-               ((looking-at
-                 (aref caml-kwop-regexps caml-max-indent-priority))
-                (let* ((kwop (caml-match-string 0))
-                       (kwop-info (assoc kwop caml-kwop-alist))
-                       (prio (if kwop-info (nth 2 kwop-info)
-                               caml-max-indent-priority)))
-                  (if (and (looking-at (aref caml-kwop-regexps 0))
-                           (not (looking-at "object"))
-                           (caml-in-expr-p))
-                      (setq in-expr t))
-                  (caml-find-kwop-skipping-blocks prio)))
-               (t
-                (if (and (= prio caml-max-indent-priority) (caml-in-expr-p))
-                    (setq in-expr t))
-                (caml-find-kwop-skipping-blocks prio))))
-        (kwop-info (assoc kwop caml-kwop-alist))
-        (indent-diff
-         (cond
-          ((not kwop-info) (beginning-of-line 1) 0)
-          ((looking-at "[[({][|<]?[ \t]*")
-           (length (caml-match-string 0)))
-          ((nth 1 kwop-info) (symbol-value (nth 3 kwop-info)))
-          (t 
-           (let ((pos (point)))
-             (back-to-indentation)
-;            (if (looking-at "\\<let\\>") (goto-char pos))
-             (- (symbol-value (nth 3 kwop-info))
-                (if (looking-at "|") caml-|-extra-indent 0))))))
-        (extra (if in-expr caml-apply-extra-indent 0)))
-        (+ indent-diff extra (current-column))))
+         (kwop (cond
+                ((looking-at "|\\([^]|]\\|\\'\\)")
+                 (caml-find-pipe-match))
+                ((and (looking-at caml-phrase-start-keywords)
+                      (caml-in-expr-p))
+                 (caml-find-end-match))
+                ((and (looking-at caml-matching-kw-regexp)
+                      (assoc (caml-match-string 0) caml-matching-kw-alist))
+                 (funcall (cdr-safe (assoc (caml-match-string 0)
+                                      caml-matching-kw-alist))))
+                ((looking-at
+                  (aref caml-kwop-regexps caml-max-indent-priority))
+                 (let* ((kwop (caml-match-string 0))
+                        (kwop-info (assoc kwop caml-kwop-alist))
+                        (prio (if kwop-info (nth 2 kwop-info)
+                                caml-max-indent-priority)))
+                   (if (and (looking-at (aref caml-kwop-regexps 0))
+                            (not (looking-at "object"))
+                            (caml-in-expr-p))
+                       (setq in-expr t))
+                   (caml-find-kwop-skipping-blocks prio)))
+                (t
+                 (if (and (= prio caml-max-indent-priority) (caml-in-expr-p))
+                     (setq in-expr t))
+                 (caml-find-kwop-skipping-blocks prio))))
+         (kwop-info (assoc kwop caml-kwop-alist))
+         (indent-diff
+          (cond
+           ((not kwop-info) (beginning-of-line 1) 0)
+           ((looking-at "[[({][|<]?[ \t]*")
+            (length (caml-match-string 0)))
+           ((nth 1 kwop-info) (symbol-value (nth 3 kwop-info)))
+           (t
+            (let ((pos (point)))
+              (back-to-indentation)
+;             (if (looking-at "\\<let\\>") (goto-char pos))
+              (- (symbol-value (nth 3 kwop-info))
+                 (if (looking-at "|") caml-|-extra-indent 0))))))
+         (extra (if in-expr caml-apply-extra-indent 0)))
+         (+ indent-diff extra (current-column))))
 
 (defconst caml-leading-kwops-regexp
   (concat
@@ -1425,19 +1425,19 @@ matching nodes to determine KEYWORD's final 
indentation.")
       (current-column))
      ((caml-in-comment-p)
       (let ((closing (looking-at "\\*)")))
-       (caml-backward-comment)
-       (looking-at comment-start-skip)
-       (+ (current-column)
-          (if closing 0 caml-comment-indent))))
+        (caml-backward-comment)
+        (looking-at comment-start-skip)
+        (+ (current-column)
+           (if closing 0 caml-comment-indent))))
      (t (let* ((leading (looking-at caml-leading-kwops-regexp))
-              (assoc-val (if leading (assoc (caml-match-string 0)
-                                            caml-leading-kwops-alist)))
-              (extra (if leading (symbol-value (nth 1 assoc-val)) 0))
-              (prio (if leading (nth 2 assoc-val)
-                      caml-max-indent-priority))
-              (basic (caml-compute-basic-indent prio)))
-         (max 0 (if extra (+ extra basic) (current-column))))))))
-                   
+               (assoc-val (if leading (assoc (caml-match-string 0)
+                                             caml-leading-kwops-alist)))
+               (extra (if leading (symbol-value (nth 1 assoc-val)) 0))
+               (prio (if leading (nth 2 assoc-val)
+                       caml-max-indent-priority))
+               (basic (caml-compute-basic-indent prio)))
+          (max 0 (if extra (+ extra basic) (current-column))))))))
+
 
 
 (defun caml-split-string ()
@@ -1446,32 +1446,32 @@ matching nodes to determine KEYWORD's final 
indentation.")
   (backward-char 1))
 
 (defadvice indent-new-comment-line (around
-                                   caml-indent-new-comment-line
-                                   activate)
-  
+                                    caml-indent-new-comment-line
+                                    activate)
+
   "Handle multi-line strings in caml mode."
 
 ;this advice doesn't make sense in other modes. I wish there were a
 ;cleaner way to do this: I haven't found one.
 
   (let ((hooked (and (eq major-mode 'caml-mode) (caml-in-literal-p)))
-       (split-mark))
+        (split-mark))
     (if (not hooked) nil
       (setq split-mark (set-marker (make-marker) (point)))
       (caml-split-string))
     ad-do-it
     (if (not hooked) nil
       (goto-char split-mark)
-      (set-marker split-mark nil))))  
-  
+      (set-marker split-mark nil))))
+
 (defadvice newline-and-indent (around
-                              caml-newline-and-indent
-                              activate)
+                               caml-newline-and-indent
+                               activate)
 
   "Handle multi-line strings in caml mode."
 
     (let ((hooked (and (eq major-mode 'caml-mode) (caml-in-literal-p)))
-       (split-mark))
+        (split-mark))
     (if (not hooked) nil
       (setq split-mark (set-marker (make-marker) (point)))
       (caml-split-string))
@@ -1488,23 +1488,23 @@ confused. It's when | is the first character of a |] 
sequence. This is
 a misfeature of caml syntax and cannot be fixed, however, as a
 workaround, the electric ] inserts | itself if the matching [ is
 followed by |."
-  
+
   (interactive "*")
   (let ((electric (and caml-electric-indent
-                      (caml-in-indentation)
-                      (not (caml-in-comment-p)))))
+                       (caml-in-indentation)
+                       (not (caml-in-comment-p)))))
     (self-insert-command 1)
     (if electric
-       (let ((indent
-              (save-excursion
-                (backward-char 1)
-                (caml-indent-command)
-                (current-column))))
-         (indent-to (- indent
-                       (symbol-value
-                        (nth 1 (assoc
-                                (char-to-string last-command-char)
-                                caml-leading-kwops-alist)))))))))
+        (let ((indent
+               (save-excursion
+                 (backward-char 1)
+                 (caml-indent-command)
+                 (current-column))))
+          (indent-to (- indent
+                        (symbol-value
+                         (nth 1 (assoc
+                                 (char-to-string last-command-char)
+                                 caml-leading-kwops-alist)))))))))
 
 (defun caml-electric-rb ()
   "If inserting a ] operator at beginning of line, reindent the line.
@@ -1514,60 +1514,60 @@ by |, insert one."
 
   (interactive "*")
   (let* ((prec (preceding-char))
-        (look-pipe (and caml-electric-close-vector
-                        (not (caml-in-comment-p))
-                        (not (caml-in-literal-p))
-                        (or (not (numberp prec))
-                            (not (char-equal ?| prec)))
-                        (set-marker (make-marker) (point))))
-        (electric (and caml-electric-indent
-                       (caml-in-indentation)
-                       (not (caml-in-comment-p)))))
+         (look-pipe (and caml-electric-close-vector
+                         (not (caml-in-comment-p))
+                         (not (caml-in-literal-p))
+                         (or (not (numberp prec))
+                             (not (char-equal ?| prec)))
+                         (set-marker (make-marker) (point))))
+         (electric (and caml-electric-indent
+                        (caml-in-indentation)
+                        (not (caml-in-comment-p)))))
     (self-insert-command 1)
     (if electric
-       (let ((indent
-              (save-excursion
-                (backward-char 1)
-                (caml-indent-command)
-                (current-column))))
-         (indent-to (- indent
-                       (symbol-value
-                        (nth 1 (assoc
-                                (char-to-string last-command-char)
-                                caml-leading-kwops-alist)))))))
+        (let ((indent
+               (save-excursion
+                 (backward-char 1)
+                 (caml-indent-command)
+                 (current-column))))
+          (indent-to (- indent
+                        (symbol-value
+                         (nth 1 (assoc
+                                 (char-to-string last-command-char)
+                                 caml-leading-kwops-alist)))))))
     (if look-pipe
-       (save-excursion
-         (let ((insert-pipe
-                (condition-case nil
-                    (prog2
-                      (backward-list 1)
-                      (if (looking-at "\\[|") "|" ""))
-                  (error ""))))
-           (goto-char look-pipe)
-           (insert insert-pipe))
-         (set-marker look-pipe nil)))))                 
+        (save-excursion
+          (let ((insert-pipe
+                 (condition-case nil
+                     (prog2
+                       (backward-list 1)
+                       (if (looking-at "\\[|") "|" ""))
+                   (error ""))))
+            (goto-char look-pipe)
+            (insert insert-pipe))
+          (set-marker look-pipe nil)))))
 
 (defun caml-abbrev-hook ()
   "If inserting a leading keyword at beginning of line, reindent the line."
-  ;itz unfortunately we need a special case 
+  ;itz unfortunately we need a special case
   (if (and (not (caml-in-comment-p)) (not (= last-command-char ?_)))
       (let* ((bol (save-excursion (beginning-of-line) (point)))
-            (kw (save-excursion
-                  (and (re-search-backward "^[ \t]*\\(\\sw+\\)\\=" bol t)
-                       (caml-match-string 1)))))
-       (if kw
-           (let ((indent (save-excursion
-                           (goto-char (match-beginning 1))
-                           (caml-indent-command)
-                           (current-column)))
-                 (abbrev-correct (if (= last-command-char ?\ ) 1 0)))
-             (indent-to (- indent
-                           (or
+             (kw (save-excursion
+                   (and (re-search-backward "^[ \t]*\\(\\sw+\\)\\=" bol t)
+                        (caml-match-string 1)))))
+        (if kw
+            (let ((indent (save-excursion
+                            (goto-char (match-beginning 1))
+                            (caml-indent-command)
+                            (current-column)))
+                  (abbrev-correct (if (= last-command-char ?\ ) 1 0)))
+              (indent-to (- indent
+                            (or
                              (symbol-value
                               (nth 1
                                    (assoc kw caml-leading-kwops-alist)))
                              0)
-                           abbrev-correct)))))))
+                            abbrev-correct)))))))
 
 (defun caml-indent-phrase ()
   (interactive "*")
@@ -1581,12 +1581,12 @@ by |, insert one."
   (if (< n 0) (caml-forward-to-less-indent (- n))
     (while (> n 0)
       (let ((i (current-indentation)))
-       (forward-line -1)
-       (while (or (> (current-indentation) i)
-                  (caml-in-comment-p)
-                  (looking-at
-                   (concat "[ \t]*\\(\n\\|" comment-start-skip "\\)")))
-         (forward-line -1)))
+        (forward-line -1)
+        (while (or (> (current-indentation) i)
+                   (caml-in-comment-p)
+                   (looking-at
+                    (concat "[ \t]*\\(\n\\|" comment-start-skip "\\)")))
+          (forward-line -1)))
       (setq n (1- n))))
   (back-to-indentation))
 
@@ -1597,21 +1597,21 @@ by |, insert one."
   (if (< n 0) (caml-backward-to-less-indent (- n))
     (while (> n 0)
       (let ((i (current-indentation)))
-       (forward-line 1)
-       (while (or (> (current-indentation) i)
-                  (caml-in-comment-p)
-                  (looking-at
-                   (concat "[ \t]*\\(\n\\|" comment-start-skip "\\)")))
-         (forward-line 1)))
+        (forward-line 1)
+        (while (or (> (current-indentation) i)
+                   (caml-in-comment-p)
+                   (looking-at
+                    (concat "[ \t]*\\(\n\\|" comment-start-skip "\\)")))
+          (forward-line 1)))
       (setq n (1- n))))
-  (back-to-indentation))  
+  (back-to-indentation))
 
 (defun caml-insert-begin-form ()
   "Inserts a nicely formatted begin-end form, leaving a mark after end."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-begin-indent c)))
     (insert "begin\n\nend")
     (push-mark)
@@ -1624,7 +1624,7 @@ by |, insert one."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-for-indent c)))
     (insert "for  do\n\ndone")
     (push-mark)
@@ -1634,13 +1634,13 @@ by |, insert one."
     (push-mark)
     (beginning-of-line 1)
     (backward-char 4)))
-  
+
 (defun caml-insert-if-form ()
   "Insert nicely formatted if-then-else form leaving mark after then, else."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-if-indent c)))
     (insert "if\n\nthen\n\nelse\n")
     (indent-line-to i)
@@ -1660,7 +1660,7 @@ by |, insert one."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-match-indent c)))
     (insert "match\n\nwith\n")
     (indent-line-to i)
@@ -1675,7 +1675,7 @@ by |, insert one."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)))
     (insert "let  in\n")
     (indent-line-to c)
@@ -1688,7 +1688,7 @@ by |, insert one."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-try-indent c)))
     (insert "try\n\nwith\n")
     (indent-line-to i)
@@ -1703,7 +1703,7 @@ by |, insert one."
   (interactive "*")
   (let ((prec (preceding-char)))
     (if (and (numberp prec) (not (char-equal ?\  (char-syntax prec))))
-       (insert " ")))
+        (insert " ")))
   (let* ((c (current-indentation)) (i (+ caml-if-indent c)))
     (insert "while  do\n\ndone")
     (push-mark)
diff --git a/camldebug.el b/camldebug.el
index a72298d..8d7b856 100644
--- a/camldebug.el
+++ b/camldebug.el
@@ -43,7 +43,7 @@
 (defvar camldebug-filter-function)
 
 (defvar camldebug-prompt-pattern "^(ocd) *"
-  "A regexp to recognize the prompt for ocamldebug.") 
+  "A regexp to recognize the prompt for ocamldebug.")
 
 (defvar camldebug-overlay-event nil
   "Overlay for displaying the current event.")
@@ -92,7 +92,7 @@ If you are in a source file, you may select a point to break
 at, by doing \\[camldebug-break].
 
 Commands:
-Many commands are inherited from comint mode. 
+Many commands are inherited from comint mode.
 Additionally we have:
 
 \\[camldebug-display-frame] display frames file in other window
@@ -100,8 +100,8 @@ Additionally we have:
 C-x SPACE sets break point at current line."
 
   (mapcar 'make-local-variable
-         '(camldebug-last-frame-displayed-p  camldebug-last-frame
-           camldebug-delete-prompt-marker camldebug-filter-function
+          '(camldebug-last-frame-displayed-p  camldebug-last-frame
+            camldebug-delete-prompt-marker camldebug-filter-function
            camldebug-filter-accumulator paragraph-start))
   (setq
    camldebug-last-frame nil
@@ -110,7 +110,7 @@ C-x SPACE sets break point at current line."
    camldebug-filter-function 'camldebug-marker-filter
    comint-prompt-regexp camldebug-prompt-pattern
    comint-dynamic-complete-functions (cons 'camldebug-complete
-                                          comint-dynamic-complete-functions)
+                                           comint-dynamic-complete-functions)
    paragraph-start comint-prompt-regexp
    camldebug-last-frame-displayed-p t)
   (make-local-variable 'shell-dirtrackp)
@@ -128,10 +128,10 @@ C-x SPACE sets break point at current line."
 to KEY, with optional doc string DOC.  Certain %-escapes in ARGS are
 interpreted specially if present.  These are:
 
-  %m   module name of current module. 
-  %d   directory of current source file. 
-  %c   number of current character position
-  %e   text of the caml variable surrounding point.
+  %m    module name of current module.
+  %d    directory of current source file.
+  %c    number of current character position
+  %e    text of the caml variable surrounding point.
 
   The `current' source file is the file of the current buffer (if
 we're in a caml buffer) or the source file current at the last break
@@ -147,40 +147,40 @@ representation is simply concatenated with the COMMAND."
 
   (let* ((fun (intern (format "camldebug-%s" name))))
     (list 'progn
-         (if doc
-             (list 'defun fun '(arg)
-                   doc 
-                   '(interactive "P")
-                   (list 'camldebug-call name args
-                         '(camldebug-numeric-arg arg))))
-         (list 'define-key 'camldebug-mode-map
-               (concat "\C-c" key)
-               (list 'quote fun))
-         (list 'define-key 'caml-mode-map
-               (concat "\C-x\C-a" key)
-               (list 'quote fun)))))
-
-(def-camldebug "step"  "\C-s"  "Step one event forward.")
+          (if doc
+              (list 'defun fun '(arg)
+                    doc
+                    '(interactive "P")
+                    (list 'camldebug-call name args
+                          '(camldebug-numeric-arg arg))))
+          (list 'define-key 'camldebug-mode-map
+                (concat "\C-c" key)
+                (list 'quote fun))
+          (list 'define-key 'caml-mode-map
+                (concat "\C-x\C-a" key)
+                (list 'quote fun)))))
+
+(def-camldebug "step"   "\C-s"  "Step one event forward.")
 (def-camldebug "backstep" "\C-k" "Step one event backward.")
-(def-camldebug "run"   "\C-r"  "Run the program.")
+(def-camldebug "run"    "\C-r"  "Run the program.")
 (def-camldebug "reverse" "\C-v" "Run the program in reverse.")
 (def-camldebug "last"   "\C-l"  "Go to latest time in execution history.")
 (def-camldebug "backtrace" "\C-t" "Print the call stack.")
-(def-camldebug "finish" "\C-f" "Finish executing current function.")
-(def-camldebug "print" "\C-p"  "Print value of symbol at point."       "%e")
-(def-camldebug "display" "\C-d"        "Display value of symbol at point."     
"%e")
-(def-camldebug "next"   "\C-n" "Step one event forward (skip functions)")
+(def-camldebug "finish" "\C-f"  "Finish executing current function.")
+(def-camldebug "print"  "\C-p"  "Print value of symbol at point."       "%e")
+(def-camldebug "display" "\C-d" "Display value of symbol at point."     "%e")
+(def-camldebug "next"   "\C-n"  "Step one event forward (skip functions)")
 (def-camldebug "up"     "<"  "Go up N stack frames (numeric arg) with display")
 (def-camldebug "down"  ">" "Go down N stack frames (numeric arg) with display")
-(def-camldebug "break"  "\C-b" "Set breakpoint at current line."
+(def-camldebug "break"  "\C-b"  "Set breakpoint at current line."
   "@ \"%m\" # %c")
 
 (defun camldebug-mouse-display (click)
   "Display value of $NNN clicked on."
   (interactive "e")
   (let* ((start (event-start click))
-        (window (car start))
-        (pos (car (cdr start)))
+         (window (car start))
+         (pos (car (cdr start)))
          symb)
     (save-excursion
       (select-window window)
@@ -194,23 +194,23 @@ representation is simply concatenated with the COMMAND."
 (defun camldebug-kill-filter (string)
   ;gob up stupid questions :-)
   (setq camldebug-filter-accumulator
-       (concat camldebug-filter-accumulator string))
+        (concat camldebug-filter-accumulator string))
   (if (not (string-match "\\(.* \\)(y or n) "
-                        camldebug-filter-accumulator)) nil
+                         camldebug-filter-accumulator)) nil
     (setq camldebug-kill-output
-         (cons t (match-string 1 camldebug-filter-accumulator)))
+          (cons t (match-string 1 camldebug-filter-accumulator)))
     (setq camldebug-filter-accumulator ""))
   (if (string-match comint-prompt-regexp camldebug-filter-accumulator)
       (let ((output (substring camldebug-filter-accumulator
-                              (match-beginning 0))))
-       (setq camldebug-kill-output 
-             (cons nil (substring camldebug-filter-accumulator 0
-                                  (1- (match-beginning 0)))))
-       (setq camldebug-filter-accumulator "")
-       output)
+                               (match-beginning 0))))
+        (setq camldebug-kill-output
+              (cons nil (substring camldebug-filter-accumulator 0
+                                   (1- (match-beginning 0)))))
+        (setq camldebug-filter-accumulator "")
+        output)
     ""))
 
-(def-camldebug "kill"  "\C-k")
+(def-camldebug "kill"   "\C-k")
 
 (defun camldebug-kill ()
   "Kill the program."
@@ -219,13 +219,13 @@ representation is simply concatenated with the COMMAND."
     (save-excursion
       (set-buffer current-camldebug-buffer)
       (let ((proc (get-buffer-process (current-buffer)))
-           (camldebug-filter-function 'camldebug-kill-filter))
-       (camldebug-call "kill")
-       (while (not (and camldebug-kill-output
-                        (zerop (length camldebug-filter-accumulator))))
-         (accept-process-output proc))))
+            (camldebug-filter-function 'camldebug-kill-filter))
+        (camldebug-call "kill")
+        (while (not (and camldebug-kill-output
+                         (zerop (length camldebug-filter-accumulator))))
+          (accept-process-output proc))))
     (if (not (car camldebug-kill-output))
-       (error (cdr camldebug-kill-output))
+        (error (cdr camldebug-kill-output))
       (sit-for 0 300)
       (camldebug-call-1 (if (y-or-n-p (cdr camldebug-kill-output)) "y" "n")))))
 ;;FIXME: camldebug doesn't output the Hide marker on kill
@@ -233,22 +233,22 @@ representation is simply concatenated with the COMMAND."
 (defun camldebug-goto-filter (string)
   ;accumulate onto previous output
   (setq camldebug-filter-accumulator
-       (concat camldebug-filter-accumulator string))
+        (concat camldebug-filter-accumulator string))
   (if (not (string-match (concat "\\(\n\\|\\`\\)[ \t]*\\([0-9]+\\)[ \t]+"
-                         camldebug-goto-position
-                         "[ \t]*\\(before\\|after\\)\n")
-                 camldebug-filter-accumulator)) nil
+                          camldebug-goto-position
+                          "[ \t]*\\(before\\|after\\)\n")
+                  camldebug-filter-accumulator)) nil
     (setq camldebug-goto-output
-         (match-string 2 camldebug-filter-accumulator))
+          (match-string 2 camldebug-filter-accumulator))
     (setq camldebug-filter-accumulator
-         (substring camldebug-filter-accumulator (1- (match-end 0)))))
+          (substring camldebug-filter-accumulator (1- (match-end 0)))))
   (if (not (string-match comint-prompt-regexp
-                        camldebug-filter-accumulator)) nil
+                         camldebug-filter-accumulator)) nil
     (setq camldebug-goto-output (or camldebug-goto-output 'fail))
     (setq camldebug-filter-accumulator ""))
   (if (string-match "\n\\(.*\\)\\'" camldebug-filter-accumulator)
       (setq camldebug-filter-accumulator
-           (match-string 1 camldebug-filter-accumulator)))
+            (match-string 1 camldebug-filter-accumulator)))
   "")
 
 (def-camldebug "goto" "\C-g")
@@ -257,7 +257,7 @@ representation is simply concatenated with the COMMAND."
   "Go to the execution time TIME.
 
 Without TIME, the command behaves as follows: In the camldebug buffer,
-if the point at buffer end, goto time 0\; otherwise, try to obtain the 
+if the point at buffer end, goto time 0\; otherwise, try to obtain the
 time from context around point. In a caml mode buffer, try to find the
 time associated in execution history with the current point location.
 
@@ -269,69 +269,69 @@ buffer, then try to obtain the time from context around 
point."
    (time
     (let ((ntime (camldebug-numeric-arg time)))
       (if (>= ntime 0) (camldebug-call "goto" nil ntime)
-       (save-selected-window
-         (select-window (get-buffer-window current-camldebug-buffer))
-         (save-excursion
-           (if (re-search-backward "^Time : [0-9]+ - pc : [0-9]+ "
-                                   nil t (- 1 ntime))
-               (camldebug-goto nil)
-             (error "I don't have %d times in my history"
-                    (- 1 ntime))))))))
+        (save-selected-window
+          (select-window (get-buffer-window current-camldebug-buffer))
+          (save-excursion
+            (if (re-search-backward "^Time : [0-9]+ - pc : [0-9]+ "
+                                    nil t (- 1 ntime))
+                (camldebug-goto nil)
+              (error "I don't have %d times in my history"
+                     (- 1 ntime))))))))
    ((eq (current-buffer) current-camldebug-buffer)
       (let ((time (cond
-                  ((eobp) 0)
-                  ((save-excursion
-                     (beginning-of-line 1)
-                     (looking-at "^Time : \\([0-9]+\\) - pc : [0-9]+ "))
-                   (string-to-int (match-string 1)))
-                  ((string-to-int (camldebug-format-command "%e"))))))
-       (camldebug-call "goto" nil time)))
+                   ((eobp) 0)
+                   ((save-excursion
+                      (beginning-of-line 1)
+                      (looking-at "^Time : \\([0-9]+\\) - pc : [0-9]+ "))
+                    (string-to-int (match-string 1)))
+                   ((string-to-int (camldebug-format-command "%e"))))))
+        (camldebug-call "goto" nil time)))
    (t
     (let ((module (camldebug-module-name (buffer-file-name)))
-         (camldebug-goto-position (int-to-string (1- (point))))
-         (camldebug-goto-output) (address))
+          (camldebug-goto-position (int-to-string (1- (point))))
+          (camldebug-goto-output) (address))
       ;get a list of all events in the current module
       (save-excursion
-       (set-buffer current-camldebug-buffer)
-       (let* ((proc (get-buffer-process (current-buffer)))
-              (camldebug-filter-function 'camldebug-goto-filter))
-         (camldebug-call-1 (concat "info events " module))
-         (while (not (and camldebug-goto-output
-                     (zerop (length camldebug-filter-accumulator))))
-           (accept-process-output proc))
-         (setq address (if (eq camldebug-goto-output 'fail) nil
-                         (re-search-backward
-                          (concat "^Time : \\([0-9]+\\) - pc : "
-                                  camldebug-goto-output
-                                  " - module "
-                                  module "$") nil t)
-                         (match-string 1)))))
+        (set-buffer current-camldebug-buffer)
+        (let* ((proc (get-buffer-process (current-buffer)))
+               (camldebug-filter-function 'camldebug-goto-filter))
+          (camldebug-call-1 (concat "info events " module))
+          (while (not (and camldebug-goto-output
+                      (zerop (length camldebug-filter-accumulator))))
+            (accept-process-output proc))
+          (setq address (if (eq camldebug-goto-output 'fail) nil
+                          (re-search-backward
+                           (concat "^Time : \\([0-9]+\\) - pc : "
+                                   camldebug-goto-output
+                                   " - module "
+                                   module "$") nil t)
+                          (match-string 1)))))
       (if address (camldebug-call "goto" nil (string-to-int address))
-       (error "No time at %s at %s" module camldebug-goto-position))))))
+        (error "No time at %s at %s" module camldebug-goto-position))))))
 
 
 (defun camldebug-delete-filter (string)
   (setq camldebug-filter-accumulator
-       (concat camldebug-filter-accumulator string))
+        (concat camldebug-filter-accumulator string))
   (if (not (string-match
-           (concat "\\(\n\\|\\`\\)[ \t]*\\([0-9]+\\)[ \t]+[0-9]+[ \t]*in "
-                   (regexp-quote camldebug-delete-file)
-                   ", character "
-                   camldebug-delete-position "\n")
-                 camldebug-filter-accumulator)) nil
+            (concat "\\(\n\\|\\`\\)[ \t]*\\([0-9]+\\)[ \t]+[0-9]+[ \t]*in "
+                    (regexp-quote camldebug-delete-file)
+                    ", character "
+                    camldebug-delete-position "\n")
+                  camldebug-filter-accumulator)) nil
     (setq camldebug-delete-output
-         (match-string 2 camldebug-filter-accumulator))
+          (match-string 2 camldebug-filter-accumulator))
     (setq camldebug-filter-accumulator
-         (substring camldebug-filter-accumulator (1- (match-end 0)))))
+          (substring camldebug-filter-accumulator (1- (match-end 0)))))
   (if (not (string-match comint-prompt-regexp
-                        camldebug-filter-accumulator)) nil
+                         camldebug-filter-accumulator)) nil
     (setq camldebug-delete-output (or camldebug-delete-output 'fail))
     (setq camldebug-filter-accumulator ""))
   (if (string-match "\n\\(.*\\)\\'" camldebug-filter-accumulator)
       (setq camldebug-filter-accumulator
-           (match-string 1 camldebug-filter-accumulator)))
+            (match-string 1 camldebug-filter-accumulator)))
   "")
-  
+
 
 (def-camldebug "delete" "\C-d")
 
@@ -352,105 +352,105 @@ around point."
    (arg
     (let ((narg (camldebug-numeric-arg arg)))
       (if (> narg 0) (camldebug-call "delete" nil narg)
-       (save-excursion
-         (set-buffer current-camldebug-buffer)
-         (if (re-search-backward "^Breakpoint [0-9]+ at [0-9]+ : file "
-                                 nil t (- 1 narg))
-             (camldebug-delete nil)
-           (error "I don't have %d breakpoints in my history"
-                    (- 1 narg)))))))
+        (save-excursion
+          (set-buffer current-camldebug-buffer)
+          (if (re-search-backward "^Breakpoint [0-9]+ at [0-9]+ : file "
+                                  nil t (- 1 narg))
+              (camldebug-delete nil)
+            (error "I don't have %d breakpoints in my history"
+                     (- 1 narg)))))))
    ((eq (current-buffer) current-camldebug-buffer)
     (let* ((bpline "^Breakpoint \\([0-9]+\\) at [0-9]+ : file ")
-          (arg (cond
-                ((eobp)
-                 (save-excursion (re-search-backward bpline nil t))
-                 (string-to-int (match-string 1)))
-                ((save-excursion
-                   (beginning-of-line 1)
-                   (looking-at bpline))
-                 (string-to-int (match-string 1)))
-                ((string-to-int (camldebug-format-command "%e"))))))
+           (arg (cond
+                 ((eobp)
+                  (save-excursion (re-search-backward bpline nil t))
+                  (string-to-int (match-string 1)))
+                 ((save-excursion
+                    (beginning-of-line 1)
+                    (looking-at bpline))
+                  (string-to-int (match-string 1)))
+                 ((string-to-int (camldebug-format-command "%e"))))))
       (camldebug-call "delete" nil arg)))
    (t
     (let ((camldebug-delete-file
-          (concat (camldebug-format-command "%m") ".ml"))
-         (camldebug-delete-position (camldebug-format-command "%c")))
+           (concat (camldebug-format-command "%m") ".ml"))
+          (camldebug-delete-position (camldebug-format-command "%c")))
       (save-excursion
-       (set-buffer current-camldebug-buffer)
-       (let ((proc (get-buffer-process (current-buffer)))
-             (camldebug-filter-function 'camldebug-delete-filter)
-             (camldebug-delete-output))
-         (camldebug-call-1 "info break")
-         (while (not (and camldebug-delete-output
-                          (zerop (length
-                                  camldebug-filter-accumulator))))
-           (accept-process-output proc))
-         (if (eq camldebug-delete-output 'fail)
-             (error "No breakpoint in %s at %s"
-                    camldebug-delete-file
-                    camldebug-delete-position)   
-           (camldebug-call "delete" nil
-                           (string-to-int camldebug-delete-output)))))))))  
+        (set-buffer current-camldebug-buffer)
+        (let ((proc (get-buffer-process (current-buffer)))
+              (camldebug-filter-function 'camldebug-delete-filter)
+              (camldebug-delete-output))
+          (camldebug-call-1 "info break")
+          (while (not (and camldebug-delete-output
+                           (zerop (length
+                                   camldebug-filter-accumulator))))
+            (accept-process-output proc))
+          (if (eq camldebug-delete-output 'fail)
+              (error "No breakpoint in %s at %s"
+                     camldebug-delete-file
+                     camldebug-delete-position)
+            (camldebug-call "delete" nil
+                            (string-to-int camldebug-delete-output)))))))))
 
 (defun camldebug-complete-filter (string)
   (setq camldebug-filter-accumulator
-       (concat camldebug-filter-accumulator string))
+        (concat camldebug-filter-accumulator string))
   (while (string-match "\\(\n\\|\\`\\)\\(.+\\)\n"
-                      camldebug-filter-accumulator) 
+                       camldebug-filter-accumulator)
     (setq camldebug-complete-list
-         (cons (match-string 2 camldebug-filter-accumulator)
-               camldebug-complete-list))
+          (cons (match-string 2 camldebug-filter-accumulator)
+                camldebug-complete-list))
     (setq camldebug-filter-accumulator
-         (substring camldebug-filter-accumulator
-                    (1- (match-end 0)))))
+          (substring camldebug-filter-accumulator
+                     (1- (match-end 0)))))
   (if (not (string-match comint-prompt-regexp
-                        camldebug-filter-accumulator)) nil
+                         camldebug-filter-accumulator)) nil
     (setq camldebug-complete-list
-         (or camldebug-complete-list 'fail))
+          (or camldebug-complete-list 'fail))
     (setq camldebug-filter-accumulator ""))
   (if (string-match "\n\\(.*\\)\\'" camldebug-filter-accumulator)
       (setq camldebug-filter-accumulator
-           (match-string 1 camldebug-filter-accumulator)))
+            (match-string 1 camldebug-filter-accumulator)))
   "")
-     
+
 (defun camldebug-complete ()
 
   "Perform completion on the camldebug command preceding point."
 
   (interactive)
   (let* ((end (point))
-        (command (save-excursion
-                   (beginning-of-line)
-                   (and (looking-at comint-prompt-regexp)
-                        (goto-char (match-end 0)))
-                   (buffer-substring (point) end)))
-        (camldebug-complete-list nil) (command-word))
+         (command (save-excursion
+                    (beginning-of-line)
+                    (and (looking-at comint-prompt-regexp)
+                         (goto-char (match-end 0)))
+                    (buffer-substring (point) end)))
+         (camldebug-complete-list nil) (command-word))
 
     ;; Find the word break.  This match will always succeed.
     (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
     (setq command-word (match-string 2 command))
-    
+
     ;itz 04-21-96 if we are trying to complete a word of nonzero
     ;length, chop off the last character. This is a nasty hack, but it
     ;works - in general, not just for this set of words: the comint
     ;call below will weed out false matches - and it avoids further
     ;mucking with camldebug's lexer.
     (if (> (length command-word) 0)
-       (setq command (substring command 0 (1- (length command)))))
-    
+        (setq command (substring command 0 (1- (length command)))))
+
     (let ((camldebug-filter-function 'camldebug-complete-filter))
       (camldebug-call-1 (concat "complete " command))
       (set-marker camldebug-delete-prompt-marker nil)
       (while (not (and camldebug-complete-list
-                      (zerop (length camldebug-filter-accumulator))))
-       (accept-process-output (get-buffer-process
-                               (current-buffer)))))
+                       (zerop (length camldebug-filter-accumulator))))
+        (accept-process-output (get-buffer-process
+                                (current-buffer)))))
     (if (eq camldebug-complete-list 'fail)
-       (setq camldebug-complete-list nil))
+        (setq camldebug-complete-list nil))
     (setq camldebug-complete-list
-         (sort camldebug-complete-list 'string-lessp))
+          (sort camldebug-complete-list 'string-lessp))
     (comint-dynamic-simple-complete command-word camldebug-complete-list)))
-       
+
 (define-key camldebug-mode-map "\C-l" 'camldebug-refresh)
 (define-key camldebug-mode-map "\t" 'comint-dynamic-complete)
 (define-key camldebug-mode-map "\M-?" 'comint-dynamic-list-completions)
@@ -478,13 +478,13 @@ the camldebug commands `cd DIR' and `directory'."
     (setq default-directory (file-name-directory path))
     (message "Current directory is %s" default-directory)
     (make-comint (concat "camldebug-" file)
-                (substitute-in-file-name camldebug-command-name)
-                nil
-                "-emacs" "-cd" default-directory file)
+                 (substitute-in-file-name camldebug-command-name)
+                 nil
+                 "-emacs" "-cd" default-directory file)
     (set-process-filter (get-buffer-process (current-buffer))
-                       'camldebug-filter)
+                        'camldebug-filter)
     (set-process-sentinel (get-buffer-process (current-buffer))
-                         'camldebug-sentinel)
+                          'camldebug-sentinel)
     (camldebug-mode)
     (camldebug-set-buffer)))
 
@@ -497,30 +497,30 @@ the camldebug commands `cd DIR' and `directory'."
 
 (defun camldebug-marker-filter (string)
   (setq camldebug-filter-accumulator
-       (concat camldebug-filter-accumulator string))
+        (concat camldebug-filter-accumulator string))
   (let ((output "") (begin))
     ;; Process all the complete markers in this chunk.
     (while (setq begin
-                (string-match 
-                 "\032\032\\(H\\|M\\(.+\\):\\(.+\\):\\(before\\|after\\)\\)\n"
-                 camldebug-filter-accumulator))
+                 (string-match
+                  "\032\032\\(H\\|M\\(.+\\):\\(.+\\):\\(before\\|after\\)\\)\n"
+                  camldebug-filter-accumulator))
       (setq camldebug-last-frame
-           (if (char-equal ?H (aref camldebug-filter-accumulator
-                                    (1+ (1+ begin)))) nil
-             (list (match-string 2 camldebug-filter-accumulator)
-                   (string-to-int
-                    (match-string 3 camldebug-filter-accumulator))
-                   (string= "before"
-                            (match-string 4
-                                          camldebug-filter-accumulator))))
-           output (concat output
-                          (substring camldebug-filter-accumulator
-                                     0 begin))
-           ;; Set the accumulator to the remaining text.
-           camldebug-filter-accumulator (substring
-                                         camldebug-filter-accumulator
-                                         (match-end 0))
-           camldebug-last-frame-displayed-p nil))
+            (if (char-equal ?H (aref camldebug-filter-accumulator
+                                     (1+ (1+ begin)))) nil
+              (list (match-string 2 camldebug-filter-accumulator)
+                    (string-to-int
+                     (match-string 3 camldebug-filter-accumulator))
+                    (string= "before"
+                             (match-string 4
+                                           camldebug-filter-accumulator))))
+            output (concat output
+                           (substring camldebug-filter-accumulator
+                                      0 begin))
+            ;; Set the accumulator to the remaining text.
+            camldebug-filter-accumulator (substring
+                                          camldebug-filter-accumulator
+                                          (match-end 0))
+            camldebug-last-frame-displayed-p nil))
 
     ;; Does the remaining text look like it might end with the
     ;; beginning of another marker?  If it does, then keep it in
@@ -528,81 +528,81 @@ the camldebug commands `cd DIR' and `directory'."
     ;; know the full marker regexp above failed, it's pretty simple to
     ;; test for marker starts.
     (if (string-match "\032.*\\'" camldebug-filter-accumulator)
-       (progn
-         ;; Everything before the potential marker start can be output.
-         (setq output (concat output (substring camldebug-filter-accumulator
-                                                0 (match-beginning 0))))
+        (progn
+          ;; Everything before the potential marker start can be output.
+          (setq output (concat output (substring camldebug-filter-accumulator
+                                                 0 (match-beginning 0))))
 
-         ;; Everything after, we save, to combine with later input.
-         (setq camldebug-filter-accumulator
-               (substring camldebug-filter-accumulator (match-beginning 0))))
+          ;; Everything after, we save, to combine with later input.
+          (setq camldebug-filter-accumulator
+                (substring camldebug-filter-accumulator (match-beginning 0))))
 
       (setq output (concat output camldebug-filter-accumulator)
-           camldebug-filter-accumulator ""))
+            camldebug-filter-accumulator ""))
 
     output))
 
 (defun camldebug-filter (proc string)
   (let ((output))
     (if (buffer-name (process-buffer proc))
-       (let ((process-window))
-         (save-excursion
-           (set-buffer (process-buffer proc))
-           ;; If we have been so requested, delete the debugger prompt.
-           (if (marker-buffer camldebug-delete-prompt-marker)
-               (progn
-                 (delete-region (process-mark proc)
-                                camldebug-delete-prompt-marker)
-                 (set-marker camldebug-delete-prompt-marker nil)))
-           (setq output (funcall camldebug-filter-function string))
-           ;; Don't display the specified file unless
-           ;; (1) point is at or after the position where output appears
-           ;; and (2) this buffer is on the screen.
-           (setq process-window (and camldebug-track-frame
-                                     (not camldebug-last-frame-displayed-p)
-                                     (>= (point) (process-mark proc))
-                                     (get-buffer-window (current-buffer))))
-           ;; Insert the text, moving the process-marker.
-           (comint-output-filter proc output))
-         (if process-window
-             (save-selected-window
-               (select-window process-window)
-               (camldebug-display-frame)))))))
+        (let ((process-window))
+          (save-excursion
+            (set-buffer (process-buffer proc))
+            ;; If we have been so requested, delete the debugger prompt.
+            (if (marker-buffer camldebug-delete-prompt-marker)
+                (progn
+                  (delete-region (process-mark proc)
+                                 camldebug-delete-prompt-marker)
+                  (set-marker camldebug-delete-prompt-marker nil)))
+            (setq output (funcall camldebug-filter-function string))
+            ;; Don't display the specified file unless
+            ;; (1) point is at or after the position where output appears
+            ;; and (2) this buffer is on the screen.
+            (setq process-window (and camldebug-track-frame
+                                      (not camldebug-last-frame-displayed-p)
+                                      (>= (point) (process-mark proc))
+                                      (get-buffer-window (current-buffer))))
+            ;; Insert the text, moving the process-marker.
+            (comint-output-filter proc output))
+          (if process-window
+              (save-selected-window
+                (select-window process-window)
+                (camldebug-display-frame)))))))
 
 (defun camldebug-sentinel (proc msg)
   (cond ((null (buffer-name (process-buffer proc)))
-        ;; buffer killed
-        ;; Stop displaying an arrow in a source file.
-        (camldebug-remove-current-event)
-        (set-process-buffer proc nil))
-       ((memq (process-status proc) '(signal exit))
-        ;; Stop displaying an arrow in a source file.
-        (camldebug-remove-current-event)
-        ;; Fix the mode line.
-        (setq mode-line-process
-              (concat ": "
-                      (symbol-name (process-status proc))))
-        (let* ((obuf (current-buffer)))
-          ;; save-excursion isn't the right thing if
-          ;;  process-buffer is current-buffer
-          (unwind-protect
-              (progn
-                ;; Write something in *compilation* and hack its mode line,
-                (set-buffer (process-buffer proc))
-                ;; Force mode line redisplay soon
-                (set-buffer-modified-p (buffer-modified-p))
-                (if (eobp)
-                    (insert ?\n mode-name " " msg)
-                  (save-excursion
-                    (goto-char (point-max))
-                    (insert ?\n mode-name " " msg)))
-                ;; If buffer and mode line will show that the process
-                ;; is dead, we can delete it now.  Otherwise it
-                ;; will stay around until M-x list-processes.
-                (delete-process proc))
-            ;; Restore old buffer, but don't restore old point
-            ;; if obuf is the cdb buffer.
-            (set-buffer obuf))))))
+         ;; buffer killed
+         ;; Stop displaying an arrow in a source file.
+         (camldebug-remove-current-event)
+         (set-process-buffer proc nil))
+        ((memq (process-status proc) '(signal exit))
+         ;; Stop displaying an arrow in a source file.
+         (camldebug-remove-current-event)
+         ;; Fix the mode line.
+         (setq mode-line-process
+               (concat ": "
+                       (symbol-name (process-status proc))))
+         (let* ((obuf (current-buffer)))
+           ;; save-excursion isn't the right thing if
+           ;;  process-buffer is current-buffer
+           (unwind-protect
+               (progn
+                 ;; Write something in *compilation* and hack its mode line,
+                 (set-buffer (process-buffer proc))
+                 ;; Force mode line redisplay soon
+                 (set-buffer-modified-p (buffer-modified-p))
+                 (if (eobp)
+                     (insert ?\n mode-name " " msg)
+                   (save-excursion
+                     (goto-char (point-max))
+                     (insert ?\n mode-name " " msg)))
+                 ;; If buffer and mode line will show that the process
+                 ;; is dead, we can delete it now.  Otherwise it
+                 ;; will stay around until M-x list-processes.
+                 (delete-process proc))
+             ;; Restore old buffer, but don't restore old point
+             ;; if obuf is the cdb buffer.
+             (set-buffer obuf))))))
 
 
 (defun camldebug-refresh (&optional arg)
@@ -620,8 +620,8 @@ Obeying it means displaying in another window the specified 
file and line."
   (if (not camldebug-last-frame)
       (camldebug-remove-current-event)
     (camldebug-display-line (car camldebug-last-frame)
-                           (car (cdr camldebug-last-frame))
-                           (car (cdr (cdr camldebug-last-frame)))))
+                            (car (cdr camldebug-last-frame))
+                            (car (cdr (cdr camldebug-last-frame)))))
   (setq camldebug-last-frame-displayed-p t))
 
 ;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen
@@ -630,19 +630,19 @@ Obeying it means displaying in another window the 
specified file and line."
 
 (defun camldebug-display-line (true-file character kind)
   (let* ((pre-display-buffer-function nil) ; screw it, put it all in one screen
-        (pop-up-windows t)
-        (buffer (find-file-noselect true-file))
-        (window (display-buffer buffer t))
-        (pos))
+         (pop-up-windows t)
+         (buffer (find-file-noselect true-file))
+         (window (display-buffer buffer t))
+         (pos))
     (save-excursion
       (set-buffer buffer)
       (save-restriction
-       (widen)
-       (setq pos (+ (point-min) character))
-       (camldebug-set-current-event pos (current-buffer) kind))
+        (widen)
+        (setq pos (+ (point-min) character))
+        (camldebug-set-current-event pos (current-buffer) kind))
       (cond ((or (< pos (point-min)) (> pos (point-max)))
-            (widen)
-            (goto-char pos))))
+             (widen)
+             (goto-char pos))))
     (set-window-point window pos)))
 
 ;;; Events.
@@ -657,12 +657,12 @@ Obeying it means displaying in another window the 
specified file and line."
 (defun camldebug-set-current-event (pos buffer before)
   (if window-system
       (if before
-         (progn
-           (move-overlay camldebug-overlay-event pos (1+ pos) buffer)
-           (move-overlay camldebug-overlay-under
-                         (+ pos 1) (+ pos 3) buffer))
-       (move-overlay camldebug-overlay-event (1- pos) pos buffer)
-       (move-overlay camldebug-overlay-under (- pos 3) (- pos 1) buffer))
+          (progn
+            (move-overlay camldebug-overlay-event pos (1+ pos) buffer)
+            (move-overlay camldebug-overlay-under
+                          (+ pos 1) (+ pos 3) buffer))
+        (move-overlay camldebug-overlay-event (1- pos) pos buffer)
+        (move-overlay camldebug-overlay-under (- pos 3) (- pos 1) buffer))
     (save-excursion
       (set-buffer buffer)
       (goto-char pos)
@@ -682,25 +682,25 @@ Obeying it means displaying in another window the 
specified file and line."
 
 (defun camldebug-format-command (str)
   (let* ((insource (not (eq (current-buffer) current-camldebug-buffer)))
-       (frame (if insource nil camldebug-last-frame)) (result))
+        (frame (if insource nil camldebug-last-frame)) (result))
     (while (and str (string-match "\\([^%]*\\)%\\([mdcep]\\)" str))
       (let ((key (string-to-char (substring str (match-beginning 2))))
-           (cmd (substring str (match-beginning 1) (match-end 1)))
-           (subst))
-       (setq str (substring str (match-end 2)))
-       (cond
-        ((eq key ?m)
-         (setq subst (camldebug-module-name
-                      (if insource (buffer-file-name) (nth 0 frame)))))
-        ((eq key ?d)
-         (setq subst (file-name-directory
-                      (if insource (buffer-file-name) (nth 0 frame)))))
-        ((eq key ?c)
-         (setq subst (int-to-string
-                      (if insource (1- (point)) (nth 1 frame)))))
-        ((eq key ?e)
-         (setq subst (thing-at-point 'symbol))))
-       (setq result (concat result cmd subst))))
+            (cmd (substring str (match-beginning 1) (match-end 1)))
+            (subst))
+        (setq str (substring str (match-end 2)))
+        (cond
+         ((eq key ?m)
+          (setq subst (camldebug-module-name
+                       (if insource (buffer-file-name) (nth 0 frame)))))
+         ((eq key ?d)
+          (setq subst (file-name-directory
+                       (if insource (buffer-file-name) (nth 0 frame)))))
+         ((eq key ?c)
+          (setq subst (int-to-string
+                       (if insource (1- (point)) (nth 1 frame)))))
+         ((eq key ?e)
+          (setq subst (thing-at-point 'symbol))))
+        (setq result (concat result cmd subst))))
     ;; There might be text left in STR when the loop ends.
     (concat result str)))
 
@@ -710,10 +710,10 @@ Obeying it means displaying in another window the 
specified file and line."
 Certain %-escapes in FMT are interpreted specially if present.
 These are:
 
-  %m   module name of current module. 
-  %d   directory of current source file. 
-  %c   number of current character position
-  %e   text of the caml variable surrounding point.
+  %m    module name of current module.
+  %d    directory of current source file.
+  %c    number of current character position
+  %e    text of the caml variable surrounding point.
 
   The `current' source file is the file of the current buffer (if
 we're in a caml buffer) or the source file current at the last break
@@ -732,7 +732,7 @@ representation is simply concatenated with the COMMAND."
   (message "Command: %s" (camldebug-call-1 command fmt arg)))
 
 (defun camldebug-call-1 (command &optional fmt arg)
-  
+
   ;; Record info on the last prompt in the buffer and its position.
   (save-excursion
     (set-buffer current-camldebug-buffer)
@@ -740,14 +740,14 @@ representation is simply concatenated with the COMMAND."
     (let ((pt (point)))
       (beginning-of-line)
       (if (looking-at comint-prompt-regexp)
-         (set-marker camldebug-delete-prompt-marker (point)))))
+          (set-marker camldebug-delete-prompt-marker (point)))))
   (let ((cmd (cond
-             (arg (concat command " " (int-to-string arg)))
-             (fmt (camldebug-format-command
-                   (concat command " " fmt)))
-             (command))))
+              (arg (concat command " " (int-to-string arg)))
+              (fmt (camldebug-format-command
+                    (concat command " " fmt)))
+              (command))))
     (process-send-string (get-buffer-process current-camldebug-buffer)
-                        (concat cmd "\n"))
+                         (concat cmd "\n"))
     cmd))
 
 
diff --git a/inf-caml.el b/inf-caml.el
index dc84cb3..0eba00e 100644
--- a/inf-caml.el
+++ b/inf-caml.el
@@ -58,24 +58,24 @@ Input and output via buffer `*inferior-caml*'."
   (if (not (comint-check-proc "*inferior-caml*"))
       (let ((cmdlist (inferior-caml-args-to-list cmd))
             (process-connection-type nil))
-       (set-buffer (apply (function make-comint)
-                          "inferior-caml" (car cmdlist) nil (cdr cmdlist)))
-       (inferior-caml-mode)))
+        (set-buffer (apply (function make-comint)
+                           "inferior-caml" (car cmdlist) nil (cdr cmdlist)))
+        (inferior-caml-mode)))
   (setq caml-shell-active t)
   (inferior-caml-show-subshell))
 
 (defun inferior-caml-args-to-list (string)
   (let ((where (string-match "[ \t]" string)))
     (cond ((null where) (list string))
-         ((not (= where 0))
-          (cons (substring string 0 where)
-                (inferior-caml-args-to-list (substring string (+ 1 where)
-                                                       (length string)))))
-         (t (let ((pos (string-match "[^ \t]" string)))
-              (if (null pos)
-                  nil
-                (inferior-caml-args-to-list (substring string pos
-                                                       (length string)))))))))
+          ((not (= where 0))
+           (cons (substring string 0 where)
+                 (inferior-caml-args-to-list (substring string (+ 1 where)
+                                                        (length string)))))
+          (t (let ((pos (string-match "[^ \t]" string)))
+               (if (null pos)
+                   nil
+                 (inferior-caml-args-to-list (substring string pos
+                                                        (length string)))))))))
 
 (defun inferior-caml-show-subshell ()
   (interactive)
@@ -103,7 +103,7 @@ Input and output via buffer `*inferior-caml*'."
                            "[ \t]*Characters[ \t]+\\([0-9]+\\)-[0-9]+:$"))
                   (string-to-int (match-string 1))))))
     (goto-char loc)))
-         
+
 
 ;;; inf-caml.el ends here
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]