comparison 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
comparison
equal deleted inserted replaced
42805:e69e129fdf8e 42806:7ec99458ed2e
695 (defun mouse-drag-region (start-event) 695 (defun mouse-drag-region (start-event)
696 "Set the region to the text that the mouse is dragged over. 696 "Set the region to the text that the mouse is dragged over.
697 Highlight the drag area as you move the mouse. 697 Highlight the drag area as you move the mouse.
698 This must be bound to a button-down mouse event. 698 This must be bound to a button-down mouse event.
699 In Transient Mark mode, the highlighting remains as long as the mark 699 In Transient Mark mode, the highlighting remains as long as the mark
700 remains active. Otherwise, it remains until the next input event." 700 remains active. Otherwise, it remains until the next input event.
701
702 If the click is in the echo area, display the `*Messages*' buffer."
701 (interactive "e") 703 (interactive "e")
704 (let ((w (posn-window (event-start start-event))))
705 (if (not (or (not (window-minibuffer-p w))
706 (minibuffer-window-active-p w)))
707 (save-excursion
708 (read-event)
709 (set-buffer "*Messages*")
710 (goto-char (point-max))
711 (display-buffer (current-buffer)))
712 ;; Give temporary modes such as isearch a chance to turn off.
713 (run-hooks 'mouse-leave-buffer-hook)
714 (mouse-drag-region-1 start-event))))
715
716 (defun mouse-drag-region-1 (start-event)
702 (mouse-minibuffer-check start-event) 717 (mouse-minibuffer-check start-event)
703 (let* ((echo-keystrokes 0) 718 (let* ((echo-keystrokes 0)
704 (start-posn (event-start start-event)) 719 (start-posn (event-start start-event))
705 (start-point (posn-point start-posn)) 720 (start-point (posn-point start-posn))
706 (start-window (posn-window start-posn)) 721 (start-window (posn-window start-posn))