show-region - Show the current copy region
show-region manipulates the currently defined region, it can be used to inquire the state of the current region, if any. It can also be used to define a region, enable and disable the region hilighting, as well as move the cursor to the start or end of the region.
Region hilighting occurs between the mark (see set-mark(2)) and point (current cursor) positions within the current buffer. A region is defined when text is copied to the kill buffer, by using any of the kill commands such as kill-region(2), or copy-region(2). However, the kill region is only visible after a copy-region(2) or a yank(2) operation. A hilight region is also created on a successful search using commands like search-forward(2), the region encloses the search matching string. Spell(2) also creates a hilight region around the current spell word. The user can also define their own region using the numeric argument to show-region.
The argument n supplied to the command indicates the require functionality and can take the following values:-
-3 - Set the start position of the region.
-2 - Move the cursor the Mark position.
-1 - Disable the hilighting of the current region.
0 - Return the current status of the region in
1 - Enable the hilighting of the current region.
2 - Move the cursor the Dot position.
3 - Set the end position of the region.
4 - Reactivate the current region.
Where an argument of 0 is used to return the current state the value of $result is a bit based flag where:-
The following errors can be generated, in each case the command returns a FALSE status:
[No current region]
[Current region not in this buffer]
If no argument is given to the command it hilights the current region, similar to an argument of 1. But the properties of the hilight, namely how long it will be hilighted for, are inherited from the setting of $show-region(5), whereas if an argument of 1 is passed in then the hilighting is set to be kept until the region becomes invalid (i.e. as if $show-region(5) is set to 3).
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/01/17
Generated On: 2006/10/07