changeset 8225:c6a3a9b2ef3f

Many doc fixes. (mouse-extend): Don't use existing region if EVENT is nil.
author Richard M. Stallman <rms@gnu.org>
date Tue, 12 Jul 1994 17:37:32 +0000
parents 1cc48bdd0c6b
children 3ad4ec3c9228
files lisp/mouse-sel.el
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse-sel.el	Tue Jul 12 17:03:13 1994 +0000
+++ b/lisp/mouse-sel.el	Tue Jul 12 17:37:32 1994 +0000
@@ -165,15 +165,15 @@
 
 (defvar mouse-sel-leave-point-near-mouse t
   "*Leave point near last mouse position.
-If non-nil, \\[mouse-select] and \\[mouse-extend] will leave point at the end
+If non-nil, \\[mouse-select] and \\[mouse-extend] leave point at the end
 of the region nearest to where the mouse last was.
-If nil, point will always be placed at the beginning of the region.")
+If nil, point is always placed at the beginning of the region.")
 
 (defvar mouse-sel-retain-highlight nil
-  "*Retain highlight on mouse-drag-overlay.
+  "*Retain highlight after dragging is finished.
 If non-nil, regions selected using \\[mouse-select] and \\[mouse-extend] will
 remain highlighted.
-If nil, highlighting will be turned off when the mouse is lifted.")
+If nil, highlighting turns off when you release the mouse button.")
 
 (defvar mouse-sel-cycle-clicks t
   "*If non-nil, \\[mouse-select] cycles the click-counts after 3 clicks.
@@ -208,12 +208,12 @@
   (if (fboundp 'x-selection-owner-p)
       'x-selection-owner-p 
     nil)
-  "Function to check whether emacs still owns the selection.
+  "Function to check whether Emacs still owns the selection.
 Called with no arguments.")
 
 (defun mouse-sel-determine-selection-type (NCLICKS)
-  "Determine what `thing' `mouse-sel' should operate on.
-The first argument is NCLICKS, is the number of consecutive
+  "Determine what \"thing\" `mouse-sel' should operate on.
+The first argument, NCLICKS, is the number of consecutive
 mouse clicks at the same position."
   (let* ((next-char (char-after (point)))
 	 (char-syntax (if next-char (char-syntax next-char)))
@@ -229,7 +229,8 @@
 (defun mouse-select (EVENT)
   "Set region/selection using the mouse.
 
-On click, point & mark are set to click position, and mark is disabled.
+Clicking sets point to click position, and deactivates the mark
+if you are in Transient Mark mode.
 Dragging extends region/selection.
 
 Double-clicking on word constituents selects words.
@@ -247,6 +248,7 @@
   (setq mouse-sel-selection-type
 	(mouse-sel-determine-selection-type (event-click-count EVENT)))
   (let ((object-bounds (bounds-of-thing-at-point mouse-sel-selection-type)))
+    (setq foo object-bounds)
     (if object-bounds
 	(progn
 	  (setq mark-active t)
@@ -263,8 +265,8 @@
 This should be bound to a down-mouse event."
   (interactive "e")
   (if EVENT (select-window (posn-window (event-end EVENT))))
-  (let* ((min (if mark-active (region-beginning) (point)))
-	 (max (if mark-active (region-end) (point)))
+  (let* ((min (if (and EVENT mark-active) (region-beginning) (point)))
+	 (max (if (and EVENT mark-active) (region-end) (point)))
 	 (orig-window (selected-window))
 	 (orig-window-frame (window-frame orig-window))
 	 (top (nth 1 (window-edges orig-window)))
@@ -332,7 +334,7 @@
 		 (t (goto-char (posn-point end)))
 
 		 )
-
+		(setq foo1 (cons (list min max (point)) foo1))
 		;; Determine direction of drag
 		(cond
 		 ((and (not direction) (not (eq min max)))