summaryrefslogtreecommitdiff
path: root/lisp/mouse-sel.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-07-12 17:37:32 +0000
committerRichard M. Stallman <rms@gnu.org>1994-07-12 17:37:32 +0000
commit72e2e0c393dec5bcab8bd1ea99e21d1cd76b0abb (patch)
treece9c228628b8a108e125582dd5f994e104fd84fa /lisp/mouse-sel.el
parent0136e1e36cf02aa96d14d2b2e2b3c0ff98236f6a (diff)
downloademacs-72e2e0c393dec5bcab8bd1ea99e21d1cd76b0abb.tar.gz
Many doc fixes.
(mouse-extend): Don't use existing region if EVENT is nil.
Diffstat (limited to 'lisp/mouse-sel.el')
-rw-r--r--lisp/mouse-sel.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el
index 57df04e1674..112f7285663 100644
--- a/lisp/mouse-sel.el
+++ b/lisp/mouse-sel.el
@@ -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 @@ Called with no argument.")
(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 @@ mouse clicks at the same position."
(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 @@ This should be bound to a down-mouse event."
(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 @@ See documentation for mouse-select for more details.
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 @@ This should be bound to a down-mouse event."
(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)))