diff lisp/mouse.el @ 42806:7ec99458ed2e

(mouse-drag-region-1): Renamed from mouse-drag-region. (mouse-drag-region): New function. For a click in the echo area, show *Messages*.
author Richard M. Stallman <rms@gnu.org>
date Thu, 17 Jan 2002 02:07:54 +0000
parents 92c21a38c096
children 0897162acd41
line wrap: on
line diff
--- a/lisp/mouse.el	Thu Jan 17 01:54:21 2002 +0000
+++ b/lisp/mouse.el	Thu Jan 17 02:07:54 2002 +0000
@@ -697,8 +697,23 @@
 Highlight the drag area as you move the mouse.
 This must be bound to a button-down mouse event.
 In Transient Mark mode, the highlighting remains as long as the mark
-remains active.  Otherwise, it remains until the next input event."
+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))))
+    (if (not (or (not (window-minibuffer-p w))
+		 (minibuffer-window-active-p w)))
+	(save-excursion
+	  (read-event)
+	  (set-buffer "*Messages*")
+	  (goto-char (point-max))
+	  (display-buffer (current-buffer)))
+      ;; Give temporary modes such as isearch a chance to turn off.
+      (run-hooks 'mouse-leave-buffer-hook)
+      (mouse-drag-region-1 start-event))))
+
+(defun mouse-drag-region-1 (start-event)
   (mouse-minibuffer-check start-event)
   (let* ((echo-keystrokes 0)
 	 (start-posn (event-start start-event))