branch: externals/caml
commit bb1103a2092964358ecc66d060ed1b06cdf817b9
Author: Didier Rémy <[email protected]>
Commit: Didier Rémy <[email protected]>
Scrolling .annot
Delete overlays.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5724
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-types.el | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/caml-types.el b/caml-types.el
index bfa99be..386e5ba 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -121,17 +121,30 @@
(right (caml-types-get-pos target-buf
(nth 2 loc) (nth 3 loc))))
(move-overlay caml-types-expr-ovl left right target-buf))
- (re-search-forward "^type(") ;; not strictly correct
+ (re-search-forward "^type(");; not strictly correct
(forward-line 1)
(re-search-forward " \\(\\([^\n)]\\|.)\\|\n[^)]\\)*\\)\n)")
(move-overlay caml-types-type-ovl (match-beginning 1) (match-end 1)
type-buf)
(message (format "type: %s" (match-string 1)))
- ; *** this doesn't seem to work, I don't know why...
- ; *** (goto-char type-point)
- ; *** workaround: set the mark instead
+ ; *** this doesn't seem to work, I
don't know why...
+ ; *** (goto-char type-point)
+ ; *** workaround: set the mark instead
(set-mark (match-beginning 1))
- (set-buffer target-buf)))))))
+ )))
+ (let
+ ((window (get-buffer-window type-buf))
+ (this-window (selected-window)))
+
+ (if window
+ (progn
+ (select-window window)
+ (goto-char (mark))
+ (select-window this-window))))
+ (unwind-protect
+ (sit-for 3)
+ (delete-overlay caml-types-expr-ovl))
+ )))
(defun caml-types-date< (date1 date2)
(or (< (car date1) (car date2))