summaryrefslogtreecommitdiffstats
path: root/emacs/caml-emacs.el
diff options
context:
space:
mode:
authorDidier Rémy <Didier.Remy@inria.fr>2003-10-20 12:06:42 +0000
committerDidier Rémy <Didier.Remy@inria.fr>2003-10-20 12:06:42 +0000
commit7cbb6ca64bf9ecc3bad176f88eef4ce7039a25a6 (patch)
treeadef6b0459a672b92beb1186c02a87991a6aafa9 /emacs/caml-emacs.el
parent60b74b3c3ceb8334aafcef82f5b84766c20af097 (diff)
caml-types:
- largest typed region is now dynamically recomputed. - changed binding to C-down-mouse-1 (allow other bindings). - allow scrolling when mouse is moved to bottom or top of window. - ignore key events, out of frame-motion, and wait for mouse release. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5875 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'emacs/caml-emacs.el')
-rw-r--r--emacs/caml-emacs.el19
1 files changed, 17 insertions, 2 deletions
diff --git a/emacs/caml-emacs.el b/emacs/caml-emacs.el
index b212db655..5f35c2451 100644
--- a/emacs/caml-emacs.el
+++ b/emacs/caml-emacs.el
@@ -5,10 +5,25 @@
(defalias 'caml-line-beginning-position 'line-beginning-position)
+(defalias 'caml-read-event 'read-event)
+(defalias 'caml-window-edges 'window-edges)
+(defun caml-mouse-vertical-position ()
+ (cddr (mouse-position)))
+(defalias 'caml-ignore-event-p 'integer-or-marker-p)
+(defalias 'caml-mouse-movement-p 'mouse-movement-p)
+(defalias 'caml-sit-for 'sit-for)
+
+(defmacro caml-track-mouse (&rest body) (cons 'track-mouse body))
+
(defun caml-event-window (e) (posn-window (event-start e)))
(defun caml-event-point-start (e) (posn-point (event-start e)))
(defun caml-event-point-end (e) (posn-point (event-end e)))
-(defalias 'caml-read-event 'read-event)
-(defmacro caml-track-mouse (&rest body) (cons 'track-mouse body))
+
+(defun caml-release-event-p (original event)
+ (and (equal (event-basic-type original) (event-basic-type event))
+ (let ((modifiers (event-modifiers event)))
+ (or (member 'drag modifiers)
+ (member 'click modifiers)))))
+
(provide 'caml-emacs)