1 ;(***********************************************************************)
5 ;(* Didier Remy, projet Cristal, INRIA Rocquencourt *)
7 ;(* Copyright 2003 Institut National de Recherche en Informatique et *)
8 ;(* en Automatique. All rights reserved. This file is distributed *)
9 ;(* under the terms of the GNU General Public License. *)
11 ;(***********************************************************************)
13 ;(* $Id: caml-xemacs.el,v 1.5.6.2 2004/11/02 10:21:03 doligez Exp $ *)
18 (defun caml-info-other-window (arg)
19 (save-excursion (info arg
))
20 (view-buffer-other-window "*info*"))
23 (defun caml-line-beginning-position ()
24 (save-excursion (beginning-of-line) (point)))
26 (defalias 'caml-read-event
'next-event
)
27 (defalias 'caml-window-edges
'window-pixel-edges
)
28 (defun caml-mouse-vertical-position ()
29 (let ((e (mouse-position-as-motion-event)))
30 (and e
(event-y-pixel e
))))
31 (defalias 'caml-mouse-movement-p
'motion-event-p
)
32 (defun caml-event-window (e)
33 (and (mouse-event-p e
) (event-window e
)))
34 (defun caml-event-point-start (e) (event-closest-point e
))
35 (defun caml-event-point-end (e) (event-closest-point e
))
36 (defun caml-ignore-event-p (e)
37 (if (and (key-press-event-p e
) (equal (key-binding e
) 'keyboard-quit
))
39 (not (mouse-event-p e
)))
42 (defun caml-sit-for (sec &optional mili
)
43 (sit-for (+ sec
(if mili
(* 0.001 mili
) 0))))
47 (defmacro caml-track-mouse
(&rest body
) (cons 'progn body
))
49 (defun caml-release-event-p (original event
)
50 (and (button-release-event-p event
)
51 (equal (event-button original
) (event-button event
))))
53 (provide 'caml-xemacs
)