(mouse-drag-region): Don't run the up-event

handler if window start changed due to the down-mouse event.
This commit is contained in:
Richard M. Stallman 2001-11-14 02:49:26 +00:00
parent f134ad18de
commit 02beb9365d
2 changed files with 54 additions and 2 deletions

View file

@ -1,3 +1,43 @@
2001-11-13 Gerd Moellmann <gerd@gnu.org>
* mouse.el (mouse-drag-region): Don't run the up-event
handler if window start changed due to the down-mouse event.
2001-11-13 Richard M. Stallman <rms@gnu.org>
* mouse.el (mouse-show-mark): Either move point to the mark
or use highlighting, never both.
(mouse-buffer-menu): If WINDOW is a frame, select its selected window.
2001-11-13 Simon Josefsson <jas@extundo.com>
* mail/smtpmail.el: Cleanup previous patch, by "Stefan Monnier"
<monnier+gnu/emacs@RUM.cs.yale.edu>.
* mail/smtpmail.el (top-level): Autoload starttls, mail-utils and
rfc2104. Require base64 and cl.
(smtpmail-smtp-service): Doc fix. :type fix.
(smtpmail-debug-info): Doc fix.
(smtpmail-debug-verb, smtpmail-auth-credentials)
(smtpmail-starttls-credentials, smtpmail-auth-supported): New
variables.
(smtpmail-deduce-address-list, smtpmail-send-it): Don't require
mail-utils (it is autoloaded).
(smtpmail-cred-server, smtpmail-cred-port, smtpmail-cred-key)
(smtpmail-cred-user, smtpmail-cred-cert, smtpmail-cred-passwd)
(smtpmail-find-credentials, smtpmail-intersection): New utility
functions.
(smtpmail-via-smtp): Support STARTTLS, if binary is installed.
(smtpmail-via-smtp): Support AUTH.
(smtpmail-via-smtp): Use `smtpmail-debug-verb' to control VERB.
2001-11-13 Richard M. Stallman <rms@gnu.org>
* ebuff-menu.el (electric-buffer-update-highlight): New function.
(electric-buffer-overlay): New variable.
(electric-buffer-menu-looper): Call electric-buffer-update-highlight.
(electric-buffer-list): Likewise.
2001-11-13 Per Starback <starback@ling.uu.se>
* isearch.el (isearch-whitespace-chars): Doc fix.

View file

@ -677,6 +677,7 @@ remains active. Otherwise, it remains until the next input event."
(start-posn (event-start start-event))
(start-point (posn-point start-posn))
(start-window (posn-window start-posn))
(start-window-start (window-start start-window))
(start-frame (window-frame start-window))
(start-hscroll (window-hscroll start-window))
(bounds (window-edges start-window))
@ -742,6 +743,7 @@ remains active. Otherwise, it remains until the next input event."
(mouse-scroll-subr start-window (1+ (- mouse-row bottom))
mouse-drag-overlay start-point)
(setq end-of-range (overlay-end mouse-drag-overlay))))))))))
;; In case we did not get a mouse-motion event
;; for the final move of the mouse before a drag event
;; pretend that we did get one.
@ -750,7 +752,6 @@ remains active. Otherwise, it remains until the next input event."
end-point (posn-point end))
(eq (posn-window end) start-window)
(integer-or-marker-p end-point))
;; Go to START-POINT first, so that when we move to END-POINT,
;; if it's in the middle of intangible text,
;; point jumps in the direction away from START-POINT.
@ -802,7 +803,18 @@ remains active. Otherwise, it remains until the next input event."
(delete-overlay mouse-drag-overlay)
;; Run the binding of the terminating up-event.
(when (and (functionp fun)
(= start-hscroll (window-hscroll start-window)))
(= start-hscroll (window-hscroll start-window))
;; Don't run the up-event handler if the
;; window start changed in a redisplay after
;; the mouse-set-point for the down-mouse
;; event at the beginning of this function.
;; When the window start has changed, the
;; up-mouse event will contain a different
;; position due to the new window contents,
;; and point is set again.
(or end-point
(= (window-start start-window)
start-window-start)))
(setq unread-command-events
(cons event unread-command-events)))))
(delete-overlay mouse-drag-overlay)))))