Update the undo list properly.
(mouse-save-then-kill): Pass those args.
When we kill, clear mouse-save-then-kill-posn
and mouse-selection-click-count.
(mouse-secondary-save-then-kill): Likewise.
Delete the overlay after deleting the selection text.
(mouse-selection-click-count): Initialize to 0.
(mouse-save-then-kill-delete-region): Handle buffers with no undo list.
Handle empty regions. Handle end < beg.
Update the undo list properly.
(mouse-save-then-kill): Pass those args.
(mouse-secondary-save-then-kll): Pass those args.
Delete the overlay after deleting the selection text.
(mouse-choose-completion): Use that. Now supports buffers
other than minibuffer.
(mouse-drag-region): Put the text on the kill ring.
Don't set mark if region is empty.
(mouse-yank-at-click): Set this-command.
(mouse-start-end): Fix double-click-on-closeparen case.
(mouse-save-then-kill): When used repeatedly at different places,
alter the nearer end of the region. This applies regardless of how
the previous selection was made.
(mouse-drag-secondary, mouse-secondary-save-then-kill):
Rewrite for xterm-style dragging and extending.
(mouse-drag-region): Commented out, and replaced with new version,
which highlights the region as we drag.
(mouse-scroll-delay, mouse-drag-overlay): New variables.
(mouse-scroll-subr): New function.
Just set-buffer, and put save-excursion around it.
(mouse-set-secondary, mouse-start-secondary): Likewise.
(mouse-drag-secondary): Switch windows and move point just temporarily.
(mouse-show-mark): New function.
(mouse-kill-ring-save, mouse-save-then-kill): Use them.
(mouse-save-then-kill): Don't let kill-region alter this-command.
Check last-command accordingly.
(mouse-split-window-vertically): Handle scroll bar events.
close to the top or bottom of a window, split at the closest
reasonable line. Give a helpful error message if the window is
too small to be split anywhere.
(mouse-split-window-horizontally): Similar changes.
(event-window, event-point, mouse-coords, mouse-timestamp):
Removed.
(event-start, event-end, posn-window, posn-point, posn-col-row,
posn-timestamp): New accessors; these are defsubsts.
(mouse-delete-window, mouse-delete-other-windows,
mouse-split-window-vertically, mouse-set-point): Rewritten to use
the new accessors.
* mouse.el: Remove hack of binding down-mouse-1.
* mouse.el (mouse-movement-p): Add docstring for this.
(mouse-split-window-horizontally): New command.
Use S-mouse-2 for them.
(mouse-delete-window): Put on mode-line mouse-3.
(mouse-save-then-kill): New command, on mouse-3.
(mouse-delete-other-windows): Use @. Now on mode-line mouse-1.
(mouse-scroll-down, mouse-scroll-up): Use e, get line from event.
(mouse-scroll-move-cursor): Likewise.
(mouse-scroll-left, mouse-scroll-right): Likewise for column.
(mouse-scroll-move-cursor-horizontally): Likewise.