mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 12:40:49 -08:00
(main): In the case of --unibyte, instead of aborting on
finding non-empty buffer, make it unibyte.
This commit is contained in:
parent
ed9c5d97f4
commit
f2b89e21fa
1 changed files with 9 additions and 6 deletions
15
src/emacs.c
15
src/emacs.c
|
|
@ -1270,12 +1270,15 @@ main (argc, argv, envp)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue