branch: externals/caml
commit b19dc864c6478ea1688c775c82980f8e7d9f7109
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>
pour que ca marche avec camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5820
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-types.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/caml-types.el b/caml-types.el
index 213011d..9b1fb16 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -207,8 +207,7 @@ See `caml-types-location-re' for annotation file format.
(r-line (string-to-int (match-string 8)))
(r-bol (string-to-int (match-string 9)))
(r-cnum (string-to-int (match-string 10))))
- (unless (not (and (string= l-file target-file)
- (string= r-file target-file)))
+ (unless (caml-types-not-in-file l-file r-file target-file)
(while (and (re-search-forward "^" () t)
(not (looking-at "type"))
(not (looking-at "\\\"")))
@@ -235,6 +234,12 @@ See `caml-types-location-re' for annotation file format.
(car stack)
(caml-types-make-node left-pos right-pos () (nreverse stack)))))))
+(defun caml-types-not-in-file (l-file r-file target-file)
+ (or (and (not (string= l-file target-file))
+ (not (string= l-file "")))
+ (and (not (string= r-file target-file))
+ (not (string= r-file "")))))
+
(defun caml-types-make-node (left-pos right-pos type-info children)
(let ((result (make-vector (+ 3 (length children)) ()))
(i 3))