diff options
author | Didier Rémy <Didier.Remy@inria.fr> | 2003-10-20 12:06:42 +0000 |
---|---|---|
committer | Didier Rémy <Didier.Remy@inria.fr> | 2003-10-20 12:06:42 +0000 |
commit | 7cbb6ca64bf9ecc3bad176f88eef4ce7039a25a6 (patch) | |
tree | adef6b0459a672b92beb1186c02a87991a6aafa9 /emacs/caml-xemacs.el | |
parent | 60b74b3c3ceb8334aafcef82f5b84766c20af097 (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-xemacs.el')
-rw-r--r-- | emacs/caml-xemacs.el | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/emacs/caml-xemacs.el b/emacs/caml-xemacs.el index b1b01bd63..ff4939157 100644 --- a/emacs/caml-xemacs.el +++ b/emacs/caml-xemacs.el @@ -9,12 +9,31 @@ (defun caml-line-beginning-position () (save-excursion (beginning-of-line) (point))) -(defun caml-event-window (e) (event-window e)) +(defalias 'caml-read-event 'next-event) +(defalias 'caml-window-edges 'window-pixel-edges) +(defun caml-mouse-vertical-position () + (let ((e (mouse-position-as-motion-event))) + (and e (event-y-pixel e)))) +(defalias 'caml-mouse-movement-p 'motion-event-p) +(defun caml-event-window (e) + (and (mouse-event-p e) (event-window e))) (defun caml-event-point-start (e) (event-closest-point e)) (defun caml-event-point-end (e) (event-closest-point e)) -(defalias 'caml-read-event 'next-event) +(defun caml-ignore-event-p (e) + (if (and (key-press-event-p e) (equal (key-binding e) 'keyboard-quit)) + (keyboard-quit)) + (not (mouse-event-p e))) + + +(defun caml-sit-for (sec &optional mili) + (sit-for (+ sec (if mili (* 0.001 mili))))) + + + (defmacro caml-track-mouse (&rest body) (cons 'progn body)) -(defun mouse-movement-p (e) (equal (event-type e) 'motion)) +(defun caml-release-event-p (original event) + (and (button-release-event-p event) + (equal (event-button original) (event-button event)))) (provide 'caml-xemacs) |