[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mouse-drag.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mouse-drag.el |
Date: |
Fri, 19 Apr 2002 11:22:01 -0400 |
Index: emacs/lisp/mouse-drag.el
diff -c emacs/lisp/mouse-drag.el:1.8 emacs/lisp/mouse-drag.el:1.9
*** emacs/lisp/mouse-drag.el:1.8 Mon Jan 8 14:12:12 2001
--- emacs/lisp/mouse-drag.el Sat Nov 17 17:37:39 2001
***************
*** 208,214 ****
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
event end row mouse-delta scroll-delta
! have-scrolled point-event-p old-binding
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
--- 208,214 ----
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
event end row mouse-delta scroll-delta
! have-scrolled
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
***************
*** 261,278 ****
(mouse-drag-safe-scroll scroll-delta scroll-col-delta)
(mouse-drag-repeatedly-safe-scroll scroll-delta
scroll-col-delta))))) ;xxx
;; If it was a click and not a drag, prepare to pass the event on.
! ;; Note: We must determine the pass-through event before restoring
! ;; the window, but invoke it after. Sigh.
(if (and (not have-scrolled)
(mouse-drag-events-are-point-events-p start-posn end))
! (setq point-event-p t
! old-binding (key-binding
! (vector (event-basic-type start-event)))))
;; Now restore the old window.
! (select-window old-selected-window)
! ;; For clicks, call the old function.
! (if point-event-p
! (call-interactively old-binding))))
(defun mouse-drag-drag (start-event)
"\"Drag\" the page according to a mouse drag.
--- 261,273 ----
(mouse-drag-safe-scroll scroll-delta scroll-col-delta)
(mouse-drag-repeatedly-safe-scroll scroll-delta
scroll-col-delta))))) ;xxx
;; If it was a click and not a drag, prepare to pass the event on.
! ;; Is there a more correct way to reconstruct the event?
(if (and (not have-scrolled)
(mouse-drag-events-are-point-events-p start-posn end))
! (push (cons (event-basic-type start-event) (cdr start-event))
! unread-command-events))
;; Now restore the old window.
! (select-window old-selected-window)))
(defun mouse-drag-drag (start-event)
"\"Drag\" the page according to a mouse drag.
***************
*** 297,303 ****
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
event end row mouse-delta scroll-delta
! have-scrolled point-event-p old-binding
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
--- 292,298 ----
(start-col (car (posn-col-row start-posn)))
(old-selected-window (selected-window))
event end row mouse-delta scroll-delta
! have-scrolled
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
***************
*** 335,352 ****
(setq have-scrolled t)
(mouse-drag-safe-scroll scroll-delta scroll-col-delta)))))))
;; If it was a click and not a drag, prepare to pass the event on.
! ;; Note: We must determine the pass-through event before restoring
! ;; the window, but invoke it after. Sigh.
(if (and (not have-scrolled)
(mouse-drag-events-are-point-events-p start-posn end))
! (setq point-event-p t
! old-binding (key-binding
! (vector (event-basic-type start-event)))))
;; Now restore the old window.
! (select-window old-selected-window)
! ;; For clicks, call the old function.
! (if point-event-p
! (call-interactively old-binding))))
(provide 'mouse-drag)
--- 330,343 ----
(setq have-scrolled t)
(mouse-drag-safe-scroll scroll-delta scroll-col-delta)))))))
;; If it was a click and not a drag, prepare to pass the event on.
! ;; Is there a more correct way to reconstruct the event?
(if (and (not have-scrolled)
(mouse-drag-events-are-point-events-p start-posn end))
! (push (cons (event-basic-type start-event) (cdr start-event))
! unread-command-events))
;; Now restore the old window.
! (select-window old-selected-window)))
!
(provide 'mouse-drag)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/mouse-drag.el,
Stefan Monnier <=