[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml eb696b8 098/197: commentaires
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml eb696b8 098/197: commentaires |
Date: |
Sat, 21 Nov 2020 01:19:46 -0500 (EST) |
branch: externals/caml
commit eb696b85e853534a95672638285d0de4f9e2177d
Author: Didier Rémy <Didier.Remy@inria.fr>
Commit: Didier Rémy <Didier.Remy@inria.fr>
commentaires
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5877
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-types.el | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/caml-types.el b/caml-types.el
index cf9ca74..743dd2f 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -434,10 +434,12 @@ The function uses two overlays.
(caml-track-mouse
(while event
(cond
- ;; In emacs eliminate
+ ;; we ignore non mouse events
((caml-ignore-event-p event))
+ ;; we stop when the original button is released
((caml-release-event-p original-event event)
(setq event nil))
+ ;; we scroll when the motion is outside the window
((and (caml-mouse-movement-p event)
(not (and (equal window (caml-event-window event))
(integer-or-marker-p
@@ -470,18 +472,25 @@ The function uses two overlays.
)
(setq speed (* speed speed))
)))
+ ;; main action, when the motion is inside the window
+ ;; or on orginal button down event
((or (caml-mouse-movement-p event)
(equal original-event event))
(setq cnum (caml-event-point-end event))
(if (and region
(<= (car region) cnum) (< cnum (cdr region)))
+ ;; mouse remains in outer region
nil
+ ;; otherwise, reset the outer region
(setq region
(caml-types-typed-make-overlay
target-buf (caml-event-point-start event))))
- (if (and limits
+ (if
+ (and limits
(>= cnum (car limits)) (< cnum (cdr limits)))
- (message mes)
+ ;; inner region is unchanged
+ nil
+ ;; recompute the inner region and type annotation
(setq target-bol
(save-excursion
(goto-char cnum) (caml-line-beginning-position))
@@ -514,14 +523,17 @@ The function uses two overlays.
(caml-types-find-interval
target-buf target-pos target-tree))
))
- (message (setq mes (format "type: %s" type)))
+ (setq mes (format "type: %s" type))
(insert type)
))
+ (message mes)
)
)
+ ;; we read next event, unless it is nil, and loop back.
(if event (setq event (caml-read-event)))
)
)
+ ;; delete overlays at end of exploration
(delete-overlay caml-types-expr-ovl)
(delete-overlay caml-types-typed-ovl)
))
- [nongnu] externals/caml 1756296 140/197: PR#5137: caml-types-explore does not work, (continued)
- [nongnu] externals/caml 1756296 140/197: PR#5137: caml-types-explore does not work, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 02303ea 147/197: PR#5727: emacs caml-mode indents shebang line in toplevel scripts, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 2c3dbdb 157/197: merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205), Stefan Monnier, 2020/11/21
- [nongnu] externals/caml ed94de1 159/197: simplify .gitignore; remove .ignore files and tools/setignore; adjust tools/check-typo, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 66c8274 050/197: run caml directly, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 6b7bd5d 073/197: changement .types -> .annot + format, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml eb43a39 074/197: - compile-command in caml.le, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 5732aaa 077/197: Changes to caml-types.el:, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml e913a93 090/197: compatibilite emacs 20 + fichiers read-only, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d17e3c1 094/197: caml-types: mouse track + little things, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml eb696b8 098/197: commentaires,
Stefan Monnier <=
- [nongnu] externals/caml 2c4bb06 100/197: - Fixes in caml-help:, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 1527d9f 112/197: petit problem de doc, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 0e62e65 123/197: fixes bug 0005016--missing quote, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 70a5593 127/197: Undoing last commit by error., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d045fae 132/197: correct fontification for strings and comments, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d9f8b96 136/197: PR#5403: give better error message when emacs is not found in PATH, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 49b5c47 138/197: More renaming to OCaml, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d75ad35 139/197: Change "Ocaml" to "OCaml" everywhere, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml a7770e1 141/197: clean up TABs and whitespace, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 16dba2b 150/197: Merge short-paths into a fresh branch of trunk., Stefan Monnier, 2020/11/21