changeset 56173:8715315bd4ab

(command_loop_1): Handle values `only' and `identity' for Vtransient_mark_mode.
author Richard M. Stallman <rms@gnu.org>
date Mon, 21 Jun 2004 03:22:34 +0000
parents e9132cd92733
children 7b713bd3dad4
files src/keyboard.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Mon Jun 21 03:20:20 2004 +0000
+++ b/src/keyboard.c	Mon Jun 21 03:22:34 2004 +0000
@@ -681,6 +681,8 @@
    to support it.  */
 static int cannot_suspend;
 
+extern Lisp_Object Qidentity, Qonly;
+
 /* Install the string STR as the beginning of the string of echoing,
    so that it serves as a prompt for the next character.
    Also start echoing.  */
@@ -1822,6 +1824,16 @@
 	    call1 (Vrun_hooks, intern ("activate-mark-hook"));
 	}
 
+      /* Setting transient-mark-mode to `only' is a way of
+	 turning it on for just one command.  */
+      if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
+	{
+	  if (EQ (Vtransient_mark_mode, Qidentity))
+	    Vtransient_mark_mode = Qnil;
+	  if (EQ (Vtransient_mark_mode, Qonly))
+	    Vtransient_mark_mode = Qidentity;
+	}
+
     finalize:
 
       if (current_buffer == prev_buffer