Emacs: Transient Mark Mode

By Xah Lee. Date: .

What is Transient Mark Mode

transient-mark-mode is a Minor Mode.

When on, it highlights the region when the region is active 〔see Elisp: Mark, Region, 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 (Released 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 (Released 2009-07), Transient Mark Mode is on by default, and 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: {fill-paragraph, ispell-word, indent-for-tab-command, comment-dwim}. The number of commands that are sensitive to existence of text selection will probably increase.

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