emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mouse.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/mouse.el [emacs-unicode-2]
Date: Fri, 22 Oct 2004 06:22:25 -0400

Index: emacs/lisp/mouse.el
diff -c emacs/lisp/mouse.el:1.241.8.3 emacs/lisp/mouse.el:1.241.8.4
*** emacs/lisp/mouse.el:1.241.8.3       Sun Jul 11 22:07:44 2004
--- emacs/lisp/mouse.el Fri Oct 22 10:13:29 2004
***************
*** 338,343 ****
--- 338,354 ----
      (select-window window)
      (enlarge-window growth nil (> growth 0))))
  
+ (defsubst mouse-drag-move-window-top (window growth)
+   "Move the top of WINDOW up or down by GROWTH lines.
+ Move it down if GROWTH is positive, or up if GROWTH is negative.
+ If this would make WINDOW too short, shrink the window or windows
+ above it to make room."
+   ;; Moving the top of WINDOW is actually moving the bottom of the
+   ;; window above.
+   (let ((window-above (mouse-drag-window-above window)))
+     (and window-above
+        (mouse-drag-move-window-bottom window-above (- growth)))))
+ 
  (defun mouse-drag-mode-line-1 (start-event mode-line-p)
    "Change the height of a window by dragging on the mode or header line.
  START-EVENT is the starting mouse-event of the drag action.
***************
*** 444,450 ****
                       (select-window start-event-window))
                   ;; no.  grow/shrink the selected window
                   ;(message "growth = %d" growth)
!                  (mouse-drag-move-window-bottom start-event-window growth))
  
                 ;; if this window's growth caused another
                 ;; window to be deleted because it was too
--- 455,463 ----
                       (select-window start-event-window))
                   ;; no.  grow/shrink the selected window
                   ;(message "growth = %d" growth)
!                  (if mode-line-p
!                      (mouse-drag-move-window-bottom start-event-window growth)
!                    (mouse-drag-move-window-top start-event-window growth)))
  
                 ;; if this window's growth caused another
                 ;; window to be deleted because it was too
***************
*** 1097,1103 ****
  Prefix arguments are interpreted as with \\[yank].
  If `mouse-yank-at-point' is non-nil, insert at point
  regardless of where you click."
!   (interactive "e\nP")
    ;; Give temporary modes such as isearch a chance to turn off.
    (run-hooks 'mouse-leave-buffer-hook)
    (or mouse-yank-at-point (mouse-set-point click))
--- 1110,1116 ----
  Prefix arguments are interpreted as with \\[yank].
  If `mouse-yank-at-point' is non-nil, insert at point
  regardless of where you click."
!   (interactive "*e\nP")
    ;; Give temporary modes such as isearch a chance to turn off.
    (run-hooks 'mouse-leave-buffer-hook)
    (or mouse-yank-at-point (mouse-set-point click))
***************
*** 1399,1405 ****
  Move point to the end of the inserted text.
  If `mouse-yank-at-point' is non-nil, insert at point
  regardless of where you click."
!   (interactive "e")
    ;; Give temporary modes such as isearch a chance to turn off.
    (run-hooks 'mouse-leave-buffer-hook)
    (or mouse-yank-at-point (mouse-set-point click))
--- 1412,1418 ----
  Move point to the end of the inserted text.
  If `mouse-yank-at-point' is non-nil, insert at point
  regardless of where you click."
!   (interactive "*e")
    ;; Give temporary modes such as isearch a chance to turn off.
    (run-hooks 'mouse-leave-buffer-hook)
    (or mouse-yank-at-point (mouse-set-point click))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]