+2002-04-19 Stefan Monnier <monnier@cs.yale.edu>
+
+ * mouse-drag.el (mouse-drag-throw, mouse-drag-drag): Push reconstructed
+ events onto unread-command-events rather than looking them up manually.
+
+ * textmodes/flyspell.el (flyspell-mode-map): Don't bind mouse-2.
+ It's bound via text-properties already.
+
2002-04-16 Eli Zaretskii <eliz@is.elta.co.il>
* term.el (term-emulate-terminal): Fix last change.
2002-03-07 Gerd Moellmann <gerd@gnu.org>
- * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
+ * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
Use the other-window instead of the other-frame functions when
the window is dedicated.
(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
+ have-scrolled
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
(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.
+ ;; 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))
- (setq point-event-p t
- old-binding (key-binding
- (vector (event-basic-type start-event)))))
+ (push (cons (event-basic-type start-event) (cdr start-event))
+ unread-command-events))
;; Now restore the old window.
- (select-window old-selected-window)
- ;; For clicks, call the old function.
- (if point-event-p
- (call-interactively old-binding))))
+ (select-window old-selected-window)))
(defun mouse-drag-drag (start-event)
"\"Drag\" the page according to a mouse drag.
(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
+ have-scrolled
window-last-row
col mouse-col-delta window-last-col
(scroll-col-delta 0)
(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.
+ ;; 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))
- (setq point-event-p t
- old-binding (key-binding
- (vector (event-basic-type start-event)))))
+ (push (cons (event-basic-type start-event) (cdr start-event))
+ unread-command-events))
;; Now restore the old window.
- (select-window old-selected-window)
- ;; For clicks, call the old function.
- (if point-event-p
- (call-interactively old-binding))))
+ (select-window old-selected-window)))
+
(provide 'mouse-drag)