changeset 93554:b05c7196d0b6

Restore support for the values `identity' and `only' for transient mark mode, since it can't hurt. Update comments.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 02 Apr 2008 20:22:37 +0000
parents 7d6ff2b15f5e
children 9ef92a2bb899
files src/keyboard.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Wed Apr 02 20:21:45 2008 +0000
+++ b/src/keyboard.c	Wed Apr 02 20:22:37 2008 +0000
@@ -661,6 +661,8 @@
 /* Nonzero means don't try to suspend even if the operating system seems
    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.
@@ -1967,6 +1969,14 @@
 
       if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks))
 	{
+	  /* In Emacs 22, setting transient-mark-mode to `only' was a
+	     way of turning it on for just one command.  This usage is
+	     obsolete, but support it anyway.  */
+	  if (EQ (Vtransient_mark_mode, Qidentity))
+	    Vtransient_mark_mode = Qnil;
+	  else if (EQ (Vtransient_mark_mode, Qonly))
+	    Vtransient_mark_mode = Qidentity;
+
 	  if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
 	    {
 	      /* We could also call `deactivate'mark'.  */