changeset 89003:313a80e39c2a

(main): In the case of --unibyte, instead of aborting on finding non-empty buffer, make it unibyte.
author Kenichi Handa <handa@m17n.org>
date Mon, 19 Aug 2002 06:11:52 +0000
parents 705b93129869
children fbd881940a45
files src/emacs.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Mon Aug 19 06:11:15 2002 +0000
+++ b/src/emacs.c	Mon Aug 19 06:11:52 2002 +0000
@@ -1270,12 +1270,15 @@
 	      Lisp_Object buffer;
 
 	      buffer = Fcdr (XCAR (tail));
-	      /* Verify that all buffers are empty now, as they
-		 ought to be.  */
-	      if (BUF_Z (XBUFFER (buffer)) > BUF_BEG (XBUFFER (buffer)))
-		abort ();
-	      /* It is safe to do this crudely in an empty buffer.  */
-	      XBUFFER (buffer)->enable_multibyte_characters = Qnil;
+	      /* Make all multibyte buffers unibyte.  */
+	      if (BUF_Z_BYTE (XBUFFER (buffer)) > BUF_Z (XBUFFER (buffer)))
+		{
+		  struct buffer *current = current_buffer;
+
+		  set_buffer_temp (XBUFFER (buffer));
+		  Fset_buffer_multibyte (Qnil, Qnil);
+		  set_buffer_temp (current);
+		}
 	    }
 	}
     }