diff options
-rw-r--r-- | lisp/simple.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index db499b4f5a4..b3a0870ea4c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1289,6 +1289,18 @@ and it reactivates the mark." (set-mark (point)) (goto-char omark) nil)) + +(defun transient-mark-mode (arg) + "Toggle Transient Mark mode. +With arg, turn Transient Mark mode on if and only if arg is positive. + +In Transient Mark mode, changing the buffer \"deactivates\" the mark. +While the mark is active, the region is highlighted." + (interactive "P") + (setq transient-mark-mode + (if (null arg) + (not transient-mark-mode) + (> (prefix-numeric-value arg) 0)))) (defvar next-line-add-newlines t "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.") |