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

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

[nongnu] externals/caml bf460c2 062/197: interactions bizarres de with


From: Stefan Monnier
Subject: [nongnu] externals/caml bf460c2 062/197: interactions bizarres de with
Date: Sat, 21 Nov 2020 01:19:38 -0500 (EST)

branch: externals/caml
commit bf460c22bc0712152e0d6c273eee94be990ec9be
Author: Jacques Garrigue <garrigue at math.nagoya-u.ac.jp>
Commit: Jacques Garrigue <garrigue at math.nagoya-u.ac.jp>

    interactions bizarres de with
    
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5257 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 caml.el | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/caml.el b/caml.el
index 95cc096..710df90 100644
--- a/caml.el
+++ b/caml.el
@@ -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))
 



reply via email to

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