interactions bizarres de with

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2002-11-12 09:04:43 +00:00
parent 6e1e330890
commit 1404188744
1 changed files with 10 additions and 5 deletions

View File

@ -1256,14 +1256,19 @@ the line where the governing keyword occurs.")
(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))
((or (string= kwop "with") (string= kwop "}"))
((caml-at-sexp-close-p)
(caml-find-paren-match (following-char)))
((string= kwop "with")
(setq unbalanced (1+ unbalanced)))
((or (string= kwop "module")
(string= kwop "functor")
(string= kwop "{")
(string= kwop "("))
(setq unbalanced 0))
(t (setq unbalanced (1- unbalanced)))))
kwop))