-;;; mouse.el --- window system-independent mouse support.
+;;; mouse.el --- window system-independent mouse support
-;;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: hardware
-;;; This file is part of GNU Emacs.
+;; This file is part of GNU Emacs.
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING. If not, write to
-;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
;;; Commentary:
;; On X, we highlight while dragging, thus once again no need to bounce.
(or transient-mark-mode
(eq (framep (selected-frame)) 'x)
+ (eq (framep (selected-frame)) 'pc)
+ (eq (framep (selected-frame)) 'win32)
(sit-for 1))
(push-mark)
(set-mark (point))
((null mouse-row))
((< mouse-row top)
(mouse-scroll-subr start-window (- mouse-row top)
- mouse-drag-overlay start-point))
+ mouse-drag-overlay start-point)
+ ;; Without this, point tends to jump back to the starting
+ ;; position where the mouse button was pressed down.
+ (setq end-of-range (overlay-start mouse-drag-overlay)))
((>= mouse-row bottom)
(mouse-scroll-subr start-window (1+ (- mouse-row bottom))
- mouse-drag-overlay start-point)))))))))
+ mouse-drag-overlay start-point)
+ (setq end-of-range (overlay-end mouse-drag-overlay))))))))))
(if (consp event)
(let ((fun (key-binding (vector (car event)))))
;; Run the binding of the terminating up-event, if possible.