Function: transient-mark-mode

Toggle Transient Mark mode.
With a prefix argument ARG, enable Transient Mark mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
Transient Mark mode if ARG is omitted or nil.

Transient Mark mode is a global minor mode. When enabled, the
region is highlighted whenever the mark is active. The mark is
"deactivated" by changing the buffer, and after certain other
operations that set the mark but whose main purpose is something
else--for example, incremental search, M-<, and M->.

You can also deactivate the mark by typing C-g or
M-ESC ESC.

Many commands change their behavior when Transient Mark mode is
in effect and the mark is active, by acting on the region instead
of their usual default part of the buffer's text. Examples of
such commands include M-;, M-x flush-lines, M-x keep-lines,
M-%, C-M-%, M-x ispell, and C-x u.
To see the documentation of commands which are sensitive to the
Transient Mark mode, invoke C-h d and type "transient" or "mark.*active" at the prompt.

Variable: transient-mark-mode

Non-nil if Transient Mark mode is enabled.
See the command `transient-mark-mode' for a description of this minor mode.

Non-nil also enables highlighting of the region whenever the mark is active.
The variable `highlight-nonselected-windows' controls whether to highlight
all windows or just the selected window.

Lisp programs may give this variable certain special values:

- A value of `lambda' enables Transient Mark mode temporarily.
It is disabled again after any subsequent action that would
normally deactivate the mark (e.g. buffer modification).

- A value of (only . OLDVAL) enables Transient Mark mode
temporarily. After any subsequent point motion command that is
not shift-translated, or any other action that would normally
deactivate the mark (e.g. buffer modification), the value of `transient-mark-mode' is set to OLDVAL.