aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorMiles Bader2004-10-22 10:13:52 +0000
committerMiles Bader2004-10-22 10:13:52 +0000
commit5ea24f9468ea9fb01253a98343a67fdb74d1817e (patch)
tree434ee6dc5f051d6deaf0c357b97b656d16e4ed12 /lisp/mouse.el
parent56c68b971d6f7665dd035df1ff302d794c0f294a (diff)
parentd5ddd795bdab373fe62ccfd099c270fd97da0964 (diff)
downloademacs-5ea24f9468ea9fb01253a98343a67fdb74d1817e.tar.gz
emacs-5ea24f9468ea9fb01253a98343a67fdb74d1817e.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-62
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-616 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-620 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-621 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-622 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-625 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-627 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-629 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-630 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-632 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-633 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-51 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-52 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-53 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-54 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-55 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-56 Update from CVS: Add lisp/legacy-gnus-agent.el * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-57 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-58 Update from CVS
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el19
1 files changed, 16 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index b73967b99dc..abf62a97836 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -338,6 +338,17 @@ shrink the window or windows above it to make room."
338 (select-window window) 338 (select-window window)
339 (enlarge-window growth nil (> growth 0)))) 339 (enlarge-window growth nil (> growth 0))))
340 340
341(defsubst mouse-drag-move-window-top (window growth)
342 "Move the top of WINDOW up or down by GROWTH lines.
343Move it down if GROWTH is positive, or up if GROWTH is negative.
344If this would make WINDOW too short, shrink the window or windows
345above it to make room."
346 ;; Moving the top of WINDOW is actually moving the bottom of the
347 ;; window above.
348 (let ((window-above (mouse-drag-window-above window)))
349 (and window-above
350 (mouse-drag-move-window-bottom window-above (- growth)))))
351
341(defun mouse-drag-mode-line-1 (start-event mode-line-p) 352(defun mouse-drag-mode-line-1 (start-event mode-line-p)
342 "Change the height of a window by dragging on the mode or header line. 353 "Change the height of a window by dragging on the mode or header line.
343START-EVENT is the starting mouse-event of the drag action. 354START-EVENT is the starting mouse-event of the drag action.
@@ -444,7 +455,9 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line."
444 (select-window start-event-window)) 455 (select-window start-event-window))
445 ;; no. grow/shrink the selected window 456 ;; no. grow/shrink the selected window
446 ;(message "growth = %d" growth) 457 ;(message "growth = %d" growth)
447 (mouse-drag-move-window-bottom start-event-window growth)) 458 (if mode-line-p
459 (mouse-drag-move-window-bottom start-event-window growth)
460 (mouse-drag-move-window-top start-event-window growth)))
448 461
449 ;; if this window's growth caused another 462 ;; if this window's growth caused another
450 ;; window to be deleted because it was too 463 ;; window to be deleted because it was too
@@ -1097,7 +1110,7 @@ and set mark at the beginning.
1097Prefix arguments are interpreted as with \\[yank]. 1110Prefix arguments are interpreted as with \\[yank].
1098If `mouse-yank-at-point' is non-nil, insert at point 1111If `mouse-yank-at-point' is non-nil, insert at point
1099regardless of where you click." 1112regardless of where you click."
1100 (interactive "e\nP") 1113 (interactive "*e\nP")
1101 ;; Give temporary modes such as isearch a chance to turn off. 1114 ;; Give temporary modes such as isearch a chance to turn off.
1102 (run-hooks 'mouse-leave-buffer-hook) 1115 (run-hooks 'mouse-leave-buffer-hook)
1103 (or mouse-yank-at-point (mouse-set-point click)) 1116 (or mouse-yank-at-point (mouse-set-point click))
@@ -1399,7 +1412,7 @@ The function returns a non-nil value if it creates a secondary selection."
1399Move point to the end of the inserted text. 1412Move point to the end of the inserted text.
1400If `mouse-yank-at-point' is non-nil, insert at point 1413If `mouse-yank-at-point' is non-nil, insert at point
1401regardless of where you click." 1414regardless of where you click."
1402 (interactive "e") 1415 (interactive "*e")
1403 ;; Give temporary modes such as isearch a chance to turn off. 1416 ;; Give temporary modes such as isearch a chance to turn off.
1404 (run-hooks 'mouse-leave-buffer-hook) 1417 (run-hooks 'mouse-leave-buffer-hook)
1405 (or mouse-yank-at-point (mouse-set-point click)) 1418 (or mouse-yank-at-point (mouse-set-point click))