emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emulation/viper-mous.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/emulation/viper-mous.el,v
Date: Sat, 01 Mar 2008 20:09:55 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/01 20:09:54

Index: viper-mous.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/viper-mous.el,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- viper-mous.el       8 Jan 2008 20:46:52 -0000       1.43
+++ viper-mous.el       1 Mar 2008 20:09:54 -0000       1.44
@@ -120,10 +120,8 @@
 
 ;; 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
-             )))
+  (let ((win (if (featurep 'xemacs) (event-window click)
+              (posn-window (event-start click)))))
     (if (window-live-p win)
        win
       (error "Click was not over a live window"))))
@@ -142,10 +140,8 @@
 
 ;; 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
-   ))
+  (if (featurep 'xemacs) (event-point click)
+    (posn-point (event-start click))))
 
 
 (defun viper-surrounding-word (count click-count)
@@ -318,14 +314,14 @@
 ;; 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
-   ))
+  (if (featurep 'xemacs) (viper-event-click-count-xemacs click)
+    (event-click-count click)))
+
+(when (featurep 'xemacs)
+
+  ;; kind of semaphore for updating viper-current-click-count
+  (defvar viper-counting-clicks-p nil)
 
-;; 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))
@@ -341,10 +337,7 @@
      (setq viper-counting-clicks-p nil)
      (if (viper-sit-for-short viper-multiclick-timeout t)
         viper-current-click-count
-       0)
-     ))
-  nil ; emacs
- )
+       0))))
 
 
 (defun viper-mouse-click-search-word (click arg)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]