(enlarge-window (- growth))
(select-window start-event-window))
;; no. grow/shrink the selected window
- (message "growth = %d" growth)
+ ;; (message "growth = %d" growth)
(enlarge-window growth))
;; if this window's growth caused another
(start-point (posn-point start-posn))
(start-window (posn-window start-posn))
(start-frame (window-frame start-window))
+ (start-hscroll (window-hscroll start-window))
(bounds (window-edges start-window))
(top (nth 1 bounds))
(bottom (if (window-minibuffer-p start-window)
(mouse-set-region-1))))
(delete-overlay mouse-drag-overlay)
;; Run the binding of the terminating up-event.
- (if (fboundp fun)
- (setq unread-command-events
- (cons event unread-command-events)))))
+ (when (and (fboundp fun)
+ (= start-hscroll (window-hscroll start-window)))
+ (setq unread-command-events
+ (cons event unread-command-events)))))
(delete-overlay mouse-drag-overlay)))))
\f
;; Commands to handle xterm-style multiple clicks.
event events key ignore
x-lost-selection-hooks)
(add-hook 'x-lost-selection-hooks
- '(lambda (seltype)
+ (lambda (seltype)
(if (eq seltype 'PRIMARY)
(progn (setq ignore t)
(throw 'mouse-show-mark t)))))
(defun mouse-yank-at-click (click arg)
"Insert the last stretch of killed text at the position clicked on.
-Also move point to one end of the text thus inserted (normally the end).
+Also move point to one end of the text thus inserted (normally the end),
+and set mark at the beginning..
Prefix arguments are interpreted as with \\[yank].
If `mouse-yank-at-point' is non-nil, insert at point
regardless of where you click."
;; Delete, but make the undo-list entry share with the kill ring.
;; First, delete just one char, so in case buffer is being modified
;; for the first time, the undo list records that fact.
- (let (before-change-function after-change-function
- before-change-functions after-change-functions)
+ (let (before-change-functions after-change-functions)
(delete-region beg
(+ beg (if (> end beg) 1 -1))))
(let ((buffer-undo-list buffer-undo-list))
;; Undo that deletion--but don't change the undo list!
- (let (before-change-function after-change-function
- before-change-functions after-change-functions)
+ (let (before-change-functions after-change-functions)
(primitive-undo 1 buffer-undo-list))
;; Now delete the rest of the specified region,
;; but don't record it.
;; This file contains the functionality of the old mldrag.el.
(defalias 'mldrag-drag-mode-line 'mouse-drag-mode-line)
(defalias 'mldrag-drag-vertical-line 'mouse-drag-vertical-line)
-(make-obsolete 'mldrag-drag-mode-line 'mouse-drag-mode-line)
-(make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line)
+(make-obsolete 'mldrag-drag-mode-line 'mouse-drag-mode-line "21.1")
+(make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1")
(provide 'mldrag)
;;; mouse.el ends here