changeset 2796:e0a9c4815584

(transient-mark-mode): New command.
author Richard M. Stallman <rms@gnu.org>
date Sat, 15 May 1993 18:47:18 +0000
parents e97e96fb0cb8
children ae18dabac465
files lisp/simple.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sat May 15 18:45:14 1993 +0000
+++ b/lisp/simple.el	Sat May 15 18:47:18 1993 +0000
@@ -1289,6 +1289,18 @@
     (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.")