From fbd8dc8a0d448042c362edf2e475a0109548870e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 11 Jan 2005 15:36:57 +0000 Subject: [PATCH] (mouse-drag-mode-line-1, mouse-drag-vertical-line, mouse-drag-region) (mouse-drag-region-1, mouse-drag-secondary): Ignore select-window events rather than fiddle with mouse-autoselect-window. --- lisp/ChangeLog | 23 +++++++++++++++-------- lisp/mouse.el | 23 +++++++++++------------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80233015b2b..2188f13d7ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,15 @@ +2005-01-11 Stefan Monnier + + * mouse.el (mouse-drag-mode-line-1, mouse-drag-vertical-line) + (mouse-drag-region, mouse-drag-region-1, mouse-drag-secondary): + Ignore select-window events rather than fiddle with + mouse-autoselect-window. + 2005-01-10 Jay Belanger * calc/calc-ext.el (calc-reset): Reset when inside embedded - calculator; only reset when point is inside a calculator. Don't - adjust the window height if the window takes up the whole height + calculator; only reset when point is inside a calculator. + Don't adjust the window height if the window takes up the whole height of the frame. 2005-01-10 Thien-Thi Nguyen @@ -25,8 +32,8 @@ (vc-disable-async-diff): New internal variable. (vc-revert-buffer): Use them to disable asynchronous diff. - * vc-cvs.el, vc-arch.el, vc-svn.el, vc-mcvs.el (vc-cvs-diff, - vc-arch-diff, vc-svn-diff, vc-mcvs-diff): Don't diff + * vc-cvs.el, vc-arch.el, vc-svn.el, vc-mcvs.el (vc-cvs-diff) + (vc-arch-diff, vc-svn-diff, vc-mcvs-diff): Don't diff asynchronously if vc-disable-async-diff is t. 2005-01-09 Jay Belanger @@ -112,7 +119,7 @@ 2005-01-06 Richard M. Stallman * emacs-lisp/find-func.el (find-face-definition): - Renamed from find-face. + Rename from find-face. 2005-01-06 Kim F. Storm @@ -128,12 +135,12 @@ 2005-01-06 Juri Linkov - * isearch.el (isearch-lazy-highlight-update): Rename - `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. + * isearch.el (isearch-lazy-highlight-update): + Rename `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. 2005-01-06 Miles Bader - * isearch.el (lazy-highlight): Renamed from `lazy-highlight-face'. + * isearch.el (lazy-highlight): Rename from `lazy-highlight-face'. (isearch-lazy-highlight-face): Use new name. 2005-01-05 Stefan Monnier diff --git a/lisp/mouse.el b/lisp/mouse.el index 63e0f6c9d91..ea6aa90e3c7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1,6 +1,6 @@ ;;; mouse.el --- window system-independent mouse support -;; Copyright (C) 1993, 94, 95, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1993, 94, 95, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -397,7 +397,6 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." (start-nwindows (count-windows t)) (old-selected-window (selected-window)) (minibuffer (frame-parameter nil 'minibuffer)) - (mouse-autoselect-window nil) should-enlarge-minibuffer event mouse y top bot edges wconfig growth) (track-mouse (progn @@ -435,7 +434,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." (cond ((integerp event) (setq done t)) - ((eq (car event) 'switch-frame) + ((memq (car event) '(switch-frame select-window)) nil) ((not (memq (car event) '(mouse-movement scroll-bar-movement))) @@ -582,7 +581,7 @@ resized by dragging their header-line." ;; unknown event. (cond ((integerp event) (setq done t)) - ((eq (car event) 'switch-frame) + ((memq (car event) '(switch-frame select-window)) nil) ((not (memq (car event) '(mouse-movement scroll-bar-movement))) @@ -754,10 +753,9 @@ remains active. Otherwise, it remains until the next input event. If the click is in the echo area, display the `*Messages*' buffer." (interactive "e") - (let ((w (posn-window (event-start start-event))) - (mouse-autoselect-window nil)) - (if (not (or (not (window-minibuffer-p w)) - (minibuffer-window-active-p w))) + (let ((w (posn-window (event-start start-event)))) + (if (and (window-minibuffer-p w) + (not (minibuffer-window-active-p w))) (save-excursion (read-event) (set-buffer "*Messages*") @@ -858,8 +856,8 @@ at the same position." (while (progn (setq event (read-event)) (or (mouse-movement-p event) - (eq (car-safe event) 'switch-frame))) - (if (eq (car-safe event) 'switch-frame) + (memq (car-safe event) '(switch-frame select-window)))) + (if (memq (car-safe event) '(switch-frame select-window)) nil (setq end (event-end event) end-point (posn-point end)) @@ -1153,6 +1151,7 @@ If MODE is 2 then do the same for lines." (move-overlay mouse-drag-overlay (point) (mark t))) (catch 'mouse-show-mark ;; In this loop, execute scroll bar and switch-frame events. + ;; Should we similarly handle `select-window' events? --Stef ;; Also ignore down-events that are undefined. (while (progn (setq event (read-event)) (setq events (append events (list event))) @@ -1476,9 +1475,9 @@ The function returns a non-nil value if it creates a secondary selection." (while (progn (setq event (read-event)) (or (mouse-movement-p event) - (eq (car-safe event) 'switch-frame))) + (memq (car-safe event) '(switch-frame select-window)))) - (if (eq (car-safe event) 'switch-frame) + (if (memq (car-safe event) '(switch-frame select-window)) nil (setq end (event-end event) end-point (posn-point end)) -- 2.39.5