summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs/caml-types.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/emacs/caml-types.el b/emacs/caml-types.el
index 213011d1a..9b1fb1601 100644
--- a/emacs/caml-types.el
+++ b/emacs/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))