Previous: , Up: The Mark and The Region   [Contents][Index]


2.2.2 Using The Mouse

It can be convenient to use the mouse to point to positions in text, especially when moving large distances. Hemlock defines several commands for using the mouse. These commands can only be used when running under X windows (see page using-x.)

Command: Here to Top of Window (bound to Rightdown)
Command: Top Line to Here (bound to Leftdown)

Here to Top of Window scrolls the window so as to move the line which is under the mouse cursor to the top of the window. This has the effect of moving forward in the buffer by the distance from the top of the window to the mouse cursor. Top Line to Here is the inverse operation, it scrolls backward, moving current the top line underneath the mouse.

If the mouse is near the left edge of a window, then these commands do smooth scrolling. Here To Top of Window repeatedly scrolls the window up by one line until the mouse button is released. Similarly, Top Line to Here smoothly scrolls down.

Command: Point to Here (bound to Middledown, S-Leftdown)

This command moves the point to the position of the mouse, changing to a different window if necessary.

When used in a window’s modeline, this moves the point of the window’s buffer to the position within the file that is the same percentage, start to end, as the horizontal position of the mouse within the modeline. This also makes this window current if necessary.

This command supplies a function Generic Pointer Up invokes if it runs without any intervening generic pointer up predecessors executing. If the position of the pointer is different than the current point when the user invokes Generic Pointer Up, then this function pushes a buffer mark at point and moves point to the pointer’s position. This allows the user to mark off a region with the mouse.

Command: Generic Pointer Up (bound to Middleup, S-Leftup)

Other commands determine this command’s action by supplying functions that this command invokes. The following built-in commands supply the following generic up actions:

Point to Here

When the position of the pointer is different than the current point, the action pushes a buffer mark at point and moves point to the pointer’s position.

Bufed Goto and Quit

The action is a no-op.

Command: Insert Kill Buffer (bound to S-Rightdown)

This command is a combination of Point to Here and Un-Kill. It moves the point to the mouse location and inserts the most recently killed text.


Previous: The Mark Stack, Up: The Mark and The Region   [Contents][Index]