Emacs can highlight the current region, using X Windows. But normally it does not. Why not?
Highlighting the region doesn't work well ordinarily in Emacs, because once you have set a mark, there is always a region (in that buffer). And highlighting the region all the time would be a nuisance.
You can turn on region highlighting by enabling Transient Mark mode. This is a more rigid mode of operation in which the region ``lasts'' only temporarily, so you must set up a region for each command that uses one. In Transient Mark mode, most of the time there is no region; therefore, highlighting the region when it exists is convenient.
To enable Transient Mark mode, type M-x transient-mark-mode. This command toggles the mode, so you can repeat the command to turn off the mode.
Here are the details of Transient Mark mode:
To set the mark, type C-SPC (set-mark-command ). This makes the mark active; as you move point, you will see the region highlighting change in extent.
The mouse commands for specifying the mark also make it active. So do keyboard commands whose purpose is to specify a region, including M-@, C-M-@, M-h, C-M-h, C-x C-p, and C-x h.
When the mark is active, you can execute commands that operate on the region, such as killing, indentation, or writing to a file.
Any change to the buffer, such as inserting or deleting a character, deactivates the mark. This means any subsequent command that operates on a region will get an error and refuse to operate. You can make the region active again by typing C-x C-x.
Commands like M-> and C-s that ``leave the mark behind'' in addition to some other primary purpose do not activate the new mark. You can activate the new region by executing C-x C-x (exchange-point-and-mark ).
C-s when the mark is active does not alter the mark.
Quitting with C-g deactivates the mark.
Transient Mark mode is also sometimes known as ``Zmacs mode'' because the Zmacs editor on the MIT Lisp Machine handled the mark in a similar way.
When multiple windows show the same buffer, they can have different regions, because they can have different values of point (though they all share common one mark position). In Transient Mark mode, each window highlights its own region. The part that is highlighted in the selected window is the region that editing commands use. See Windows.
When Transient Mark mode is not enabled, every command that sets the mark also activates it, and nothing ever deactivates it.