Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling transient-mark-mode

In my .emacs file, I have

(setq transient-mark-mode nil)

and yet transient-mark-mode is activated when I start up Emacs. Calling transient-mark-mode gives the message "transient-mark-mode disabled", but Control-Space still starts highlighting a region.

Is there a way to turn this off?

like image 713
Nathaniel Flath Avatar asked May 25 '09 00:05

Nathaniel Flath


People also ask

What is transient mark mode?

In Transient Mark mode, the region is active only temporarily, and it is highlighted while it is active. You activate the region for each command that uses it: place the mark, then move the cursor (and point). Some features in Emacs support extra behaviors or require it to be on.

What is Mark Emacs?

Many Emacs commands operate on an arbitrary contiguous part of the current buffer. To specify the text for such a command to operate on, you set the mark at one end of it, and move point to the other end. The text between point and the mark is called the region.

How do I select a region in Emacs?

Click the mouse's left button at the start of the area to be selected, and drag the mouse to the end of the area. The region you selected should be highlighted.


1 Answers

You might have cua-mode enabled as well which has similar region highlighting to transient-mark-mode. To test this just M-x cua-mode (to toggle it on/off) and see if it disables the highlighting.

From C-h f cua-mode help:

CUA mode manages Transient Mark mode internally. Trying to disable Transient Mark mode while CUA mode is enabled does not work; if you only want to highlight the region when it is selected using a shifted movement key, set `cua-highlight-region-shift-only'.

like image 200
luapyad Avatar answered Oct 05 '22 14:10

luapyad