]> git.eshelyaron.com Git - emacs.git/commitdiff
(command_loop_1): Handle values `only' and `identity' for Vtransient_mark_mode.
authorRichard M. Stallman <rms@gnu.org>
Mon, 21 Jun 2004 03:22:34 +0000 (03:22 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 21 Jun 2004 03:22:34 +0000 (03:22 +0000)
src/keyboard.c

index b4b7e64e4ce702b3925649b9473af1c834b2a8ae..9b36e96b70dcfe01d7c3b961fd6f3e1325f18cb0 100644 (file)
@@ -681,6 +681,8 @@ static SIGTYPE interrupt_signal P_ ((int signalnum));
    to support it.  */
 static int cannot_suspend;
 
+extern Lisp_Object Qidentity, Qonly;
+\f
 /* 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 @@ command_loop_1 ()
            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