aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-08-19 06:11:52 +0000
committerKenichi Handa2002-08-19 06:11:52 +0000
commitf2b89e21fa128a8685fd1dd09d5fc0126b2ade58 (patch)
treeb1c8b6165cd91ba5b0dd87e9802e541ac8c88a94 /src
parented9c5d97f48cacedd9caf0a7cf7913c4c2ec209f (diff)
downloademacs-f2b89e21fa128a8685fd1dd09d5fc0126b2ade58.tar.gz
emacs-f2b89e21fa128a8685fd1dd09d5fc0126b2ade58.zip
(main): In the case of --unibyte, instead of aborting on
finding non-empty buffer, make it unibyte.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 1157f0ee2dc..afbad1cd58e 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1270,12 +1270,15 @@ main (argc, argv, envp)
1270 Lisp_Object buffer; 1270 Lisp_Object buffer;
1271 1271
1272 buffer = Fcdr (XCAR (tail)); 1272 buffer = Fcdr (XCAR (tail));
1273 /* Verify that all buffers are empty now, as they 1273 /* Make all multibyte buffers unibyte. */
1274 ought to be. */ 1274 if (BUF_Z_BYTE (XBUFFER (buffer)) > BUF_Z (XBUFFER (buffer)))
1275 if (BUF_Z (XBUFFER (buffer)) > BUF_BEG (XBUFFER (buffer))) 1275 {
1276 abort (); 1276 struct buffer *current = current_buffer;
1277 /* It is safe to do this crudely in an empty buffer. */ 1277
1278 XBUFFER (buffer)->enable_multibyte_characters = Qnil; 1278 set_buffer_temp (XBUFFER (buffer));
1279 Fset_buffer_multibyte (Qnil, Qnil);
1280 set_buffer_temp (current);
1281 }
1279 } 1282 }
1280 } 1283 }
1281 } 1284 }