[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-mous.el
From: |
Michael Kifer |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emulation/viper-mous.el |
Date: |
Mon, 07 Jan 2002 23:36:05 -0500 |
Index: emacs/lisp/emulation/viper-mous.el
diff -c emacs/lisp/emulation/viper-mous.el:1.29
emacs/lisp/emulation/viper-mous.el:1.30
*** emacs/lisp/emulation/viper-mous.el:1.29 Sun Sep 9 18:33:38 2001
--- emacs/lisp/emulation/viper-mous.el Mon Jan 7 23:36:00 2002
***************
*** 1,8 ****
;;; viper-mous.el --- mouse support for Viper
! ;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
! ;; Author: Michael Kifer <address@hidden>
;; This file is part of GNU Emacs.
--- 1,8 ----
;;; viper-mous.el --- mouse support for Viper
! ;; Copyright (C) 1994, 95, 96, 97, 2001, 02 Free Software Foundation, Inc.
! ;; Author: Michael Kifer <address@hidden>
;; This file is part of GNU Emacs.
***************
*** 121,129 ****
;; Returns window where click occurs
(defun viper-mouse-click-window (click)
! (let ((win (if viper-xemacs-p
! (event-window click)
! (posn-window (event-start click)))))
(if (window-live-p win)
win
(error "Click was not over a live window"))))
--- 121,130 ----
;; Returns window where click occurs
(defun viper-mouse-click-window (click)
! (let ((win (viper-cond-compile-for-xemacs-or-emacs
! (event-window click) ; xemacs
! (posn-window (event-start click)) ; emacs
! )))
(if (window-live-p win)
win
(error "Click was not over a live window"))))
***************
*** 142,150 ****
;; Returns position of a click
(defsubst viper-mouse-click-posn (click)
! (if viper-xemacs-p
! (event-point click)
! (posn-point (event-start click))))
(defun viper-surrounding-word (count click-count)
--- 143,152 ----
;; Returns position of a click
(defsubst viper-mouse-click-posn (click)
! (viper-cond-compile-for-xemacs-or-emacs
! (event-point click) ; xemacs
! (posn-point (event-start click)) ; emacs
! ))
(defun viper-surrounding-word (count click-count)
***************
*** 317,345 ****
;; XEmacs has no double-click events. So, we must simulate.
;; So, we have to simulate event-click-count.
(defun viper-event-click-count (click)
! (if viper-xemacs-p
! (viper-event-click-count-xemacs click)
! (event-click-count click)))
;; kind of semaphore for updating viper-current-click-count
(defvar viper-counting-clicks-p nil)
! (defun viper-event-click-count-xemacs (click)
! (let ((time-delta (- (event-timestamp click)
! viper-last-click-event-timestamp))
! inhibit-quit)
! (while viper-counting-clicks-p
! (ignore))
! (setq viper-counting-clicks-p t)
! (if (> time-delta viper-multiclick-timeout)
! (setq viper-current-click-count 0))
! (discard-input)
! (setq viper-current-click-count (1+ viper-current-click-count)
! viper-last-click-event-timestamp (event-timestamp click))
! (setq viper-counting-clicks-p nil)
! (if (viper-sit-for-short viper-multiclick-timeout t)
! viper-current-click-count
! 0)
! ))
(defun viper-mouse-click-search-word (click arg)
--- 319,351 ----
;; XEmacs has no double-click events. So, we must simulate.
;; So, we have to simulate event-click-count.
(defun viper-event-click-count (click)
! (viper-cond-compile-for-xemacs-or-emacs
! (viper-event-click-count-xemacs click) ; xemacs
! (event-click-count click) ; emacs
! ))
;; kind of semaphore for updating viper-current-click-count
(defvar viper-counting-clicks-p nil)
! (viper-cond-compile-for-xemacs-or-emacs
! (defun viper-event-click-count-xemacs (click)
! (let ((time-delta (- (event-timestamp click)
! viper-last-click-event-timestamp))
! inhibit-quit)
! (while viper-counting-clicks-p
! (ignore))
! (setq viper-counting-clicks-p t)
! (if (> time-delta viper-multiclick-timeout)
! (setq viper-current-click-count 0))
! (discard-input)
! (setq viper-current-click-count (1+ viper-current-click-count)
! viper-last-click-event-timestamp (event-timestamp click))
! (setq viper-counting-clicks-p nil)
! (if (viper-sit-for-short viper-multiclick-timeout t)
! viper-current-click-count
! 0)
! ))
! nil ; emacs
! )
(defun viper-mouse-click-search-word (click arg)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emulation/viper-mous.el,
Michael Kifer <=