From: Stefan Monnier Date: Fri, 14 Oct 2011 18:36:33 +0000 (-0400) Subject: * lisp/mouse.el (mouse-drag-mode-line-1): Modify the end-event we pushed on X-Git-Tag: emacs-pretest-24.0.91~121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=984889776cb97e1c80d763767770de4787df6c89;p=emacs.git * lisp/mouse.el (mouse-drag-mode-line-1): Modify the end-event we pushed on unread-command-events rather than pushing yet-another event. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 680383b21f3..876628940c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-10-14 Stefan Monnier + + * mouse.el (mouse-drag-mode-line-1): Modify the end-event we pushed on + unread-command-events rather than pushing yet-another event. + 2011-10-14 Eli Zaretskii * mail/sendmail.el (sendmail-query-once): Improve the wording of diff --git a/lisp/mouse.el b/lisp/mouse.el index 8a74782250d..ff175288445 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -540,11 +540,13 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." ;; be `mouse-1', whereas if this did move the mouse, it should be ;; a `drag-mouse-1'. In any case `on-link' would have been nulled ;; above if there had been any significant mouse movement. - (when (and on-link (eq 'mouse-1 (car-safe event))) + (when (and on-link + (eq 'mouse-1 (car-safe (car unread-command-events)))) ;; If mouse-2 has never been done by the user, it doesn't ;; have the necessary property to be interpreted correctly. (put 'mouse-2 'event-kind 'mouse-click) - (push (cons 'mouse-2 (cdr event)) unread-command-events)))))) + (setcar unread-command-events + (cons 'mouse-2 (cdar unread-command-events)))))))) (defun mouse-drag-mode-line (start-event) "Change the height of a window by dragging on the mode line."