changeset 5242:0e99ea9941e2

(Fmessage): Use message2. (Fsubst_char_in_region): Move the NOUNDO hacking code after the modify_region call.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 01:28:34 +0000
parents 1536c6b80ff6
children 13cce14b5a0c
files src/editfns.c
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Thu Dec 23 01:26:50 1993 +0000
+++ b/src/editfns.c	Thu Dec 23 01:28:34 1993 +0000
@@ -1141,14 +1141,6 @@
   stop = XINT (end);
   look = XINT (fromchar);
 
-  if (! NILP (noundo))
-    {
-      if (MODIFF - 1 == current_buffer->save_modified)
-	current_buffer->save_modified++;
-      if (MODIFF - 1 == current_buffer->auto_save_modified)
-	current_buffer->auto_save_modified++;
-    }
-
   while (pos < stop)
     {
       if (FETCH_CHAR (pos) == look)
@@ -1156,7 +1148,16 @@
 	  if (! changed)
 	    {
 	      modify_region (current_buffer, XINT (start), stop);
-	      changed = 1;
+
+	      if (! NILP (noundo))
+		{
+		  if (MODIFF - 1 == current_buffer->save_modified)
+		    current_buffer->save_modified++;
+		  if (MODIFF - 1 == current_buffer->auto_save_modified)
+		    current_buffer->auto_save_modified++;
+		}
+
+ 	      changed = 1;
 	    }
 
 	  if (NILP (noundo))
@@ -1382,7 +1383,7 @@
     {
       register Lisp_Object val;
       val = Fformat (nargs, args);
-      message ("%s", XSTRING (val)->data);
+      message2 (XSTRING (val)->data, XSTRING (val)->size);
       return val;
     }
 }