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

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

[nongnu] externals/caml 1756296 140/197: PR#5137: caml-types-explore doe


From: Stefan Monnier
Subject: [nongnu] externals/caml 1756296 140/197: PR#5137: caml-types-explore does not work
Date: Sat, 21 Nov 2020 01:19:54 -0500 (EST)

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

    PR#5137: caml-types-explore does not work
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12696 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 caml-types.el | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/caml-types.el b/caml-types.el
index e42a0fc..d63eaf1 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -594,7 +594,7 @@ The function uses two overlays.
  . One overlay delimits the largest region whose all subnodes
    are well-typed.
  . Another overlay delimits the current node under the mouse (whose type
-   annotation is beeing displayed).
+   annotation is being displayed).
 "
   (interactive "e")
   (set-buffer (window-buffer (caml-event-window event)))
@@ -686,30 +686,30 @@ The function uses two overlays.
                            target-pos
                            (vector target-file target-line target-bol cnum))
                      (save-excursion
-                       (setq node (caml-types-find-location "type"
-                                   target-pos () target-tree))
+                       (setq node (caml-types-find-location target-pos "type" 
()
+                                                           target-tree))
                        (set-buffer caml-types-buffer)
                        (erase-buffer)
                        (cond
-                        (node
-                         (setq Left
-                               (caml-types-get-pos target-buf (elt node 0))
-                               Right
-                               (caml-types-get-pos target-buf (elt node 1)))
-                         (move-overlay
-                          caml-types-expr-ovl Left Right target-buf)
-                         (setq limits
-                               (caml-types-find-interval target-buf
-                                                         target-pos node)
-                               type (elt node 2))
-                         )
-                        (t
+                       ((null node)
                          (delete-overlay caml-types-expr-ovl)
                          (setq type "*no type information*")
                          (setq limits
                                (caml-types-find-interval
-                                target-buf target-pos target-tree))
+                                target-buf target-pos target-tree)))
+                        (t
+                        (let ((left
+                               (caml-types-get-pos target-buf (elt node 0)))
+                               (right
+                               (caml-types-get-pos target-buf (elt node 1))))
+                         (move-overlay
+                          caml-types-expr-ovl left right target-buf)
+                         (setq limits
+                               (caml-types-find-interval target-buf
+                                                         target-pos node)
+                               type (cdr (assoc "type" (elt node 2))))
                          ))
+                       )
                        (setq mes (format "type: %s" type))
                        (insert type)
                        ))



reply via email to

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