[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog mouse.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog mouse.el |
Date: |
Sat, 31 Jan 2009 22:14:56 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/01/31 22:14:56
Modified files:
lisp : ChangeLog mouse.el
Log message:
(mouse-drag-mode-line-1): Obey mouse-1-click-follows-link.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15235&r2=1.15236
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mouse.el?cvsroot=emacs&r1=1.352&r2=1.353
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15235
retrieving revision 1.15236
diff -u -b -r1.15235 -r1.15236
--- ChangeLog 31 Jan 2009 22:10:22 -0000 1.15235
+++ ChangeLog 31 Jan 2009 22:14:53 -0000 1.15236
@@ -1,5 +1,7 @@
2009-01-31 Stefan Monnier <address@hidden>
+ * mouse.el (mouse-drag-mode-line-1): Obey mouse-1-click-follows-link.
+
* progmodes/ebrowse.el:
* international/robin.el:
* emulation/viper-util.el:
Index: mouse.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mouse.el,v
retrieving revision 1.352
retrieving revision 1.353
diff -u -b -r1.352 -r1.353
--- mouse.el 27 Jan 2009 20:43:27 -0000 1.352
+++ mouse.el 31 Jan 2009 22:14:56 -0000 1.353
@@ -419,6 +419,10 @@
(start-event-window (posn-window start))
(start-event-frame (window-frame start-event-window))
(start-nwindows (count-windows t))
+ (on-link (and mouse-1-click-follows-link
+ (or mouse-1-click-in-non-selected-windows
+ (eq (posn-window start) (selected-window)))
+ (mouse-on-link-p start)))
(minibuffer (frame-parameter nil 'minibuffer))
should-enlarge-minibuffer event mouse y top bot edges wconfig growth)
(track-mouse
@@ -491,6 +495,11 @@
(one-window-p t))
(error "Attempt to resize sole window"))
+ ;; If we ever move, make sure we don't mistakenly treat
+ ;; some unexpected `mouse-1' final event as a sign that
+ ;; this whole drag was nothing more than a click.
+ (if (/= growth 0) (setq on-link nil))
+
;; grow/shrink minibuffer?
(if should-enlarge-minibuffer
(unless resize-mini-windows
@@ -519,7 +528,14 @@
(nth 1 (window-edges
;; Choose right window.
start-event-window)))))
- (set-window-configuration wconfig)))))))))
+ (set-window-configuration wconfig)))))
+
+ ;; Presumably if this was just a click, the last event should
+ ;; 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)))
+ (push (cons 'mouse-2 (cdr event)) unread-command-events))))))
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on the mode line."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog mouse.el,
Stefan Monnier <=