| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] |
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0005137 | OCaml | OCaml general | public | 2010-08-28 23:05 | 2012-07-10 19:52 |
|
| Reporter | Christophe Troestler | |
| Assigned To | doligez | |
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | |
| Platform | | OS | | OS Version | |
| Product Version | 3.13.0+dev | |
| Target Version | | Fixed in Version | 4.00.0+dev | |
|
| Summary | 0005137: caml-types-explore does not work |
| Description | The current implementation of caml-types-explore raises an exception (due to an incorrect use of caml-types-find-location). The attached patch fixes that. |
| Tags | No tags attached. |
|
| Attached Files | caml-types.patch [^] (2,422 bytes) 2010-08-28 23:05 [Show Content] [Hide Content]=== modified file 'caml-types.el'
--- old/caml-types.el 2010-08-28 19:23:55 +0000
+++ new/caml-types.el 2010-08-28 20:04:48 +0000
@@ -686,30 +686,30 @@
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)))
+ ((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)))
+ (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)
+ caml-types-expr-ovl left right target-buf)
(setq limits
(caml-types-find-interval target-buf
target-pos node)
- type (elt node 2))
- )
- (t
- (delete-overlay caml-types-expr-ovl)
- (setq type "*no type information*")
- (setq limits
- (caml-types-find-interval
- target-buf target-pos target-tree))
+ type (cdr (assoc "type" (elt node 2))))
))
+ )
(setq mes (format "type: %s" type))
(insert type)
))
|
|