Emacs: Transient Mark Mode

By Xah Lee. Date: . Last updated: .

What is Transient Mark Mode

Transient Mark Mode is a Minor Mode.

When on, it highlights the region when the region is active. And many commands automatically act on the active region.

transient-mark-mode
  • Minor mode.
  • Highlight active region.
  • It is introduced in emacs 19 (released in 1994).
  • It is on by default since Emacs 23 (date 2009-07)
transient-mark-mode

Variable. When true, it indicates transient-mark-mode is on.

Emacs 23, Transient Mark Mode on by Default

Starting with Emacs 23 (date 2009-07), Transient Mark Mode is on by default.

many command's behavior changed. If there is a text selection, the command acts on it, else it acts on the current word, line, paragraph, buffer (or whatever is its default input).

Commands with this new behavior includes:

Note that commands ending in “-region” still should act on region as before, regardless of the region activeness status.

This change is good, because users don't need to think about which of the region or non-region command to call.

Elisp, mark, region