From a1a17b614d5b629993e4c7d6591045e9f6b0d64e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 27 Feb 1997 11:15:55 +0000 Subject: [PATCH] (init_buffer_once): Make member enable_multibyte_characters of struct buffer not always local. (reset_buffer): Do not reset b->enable_multibyte_characters. (syms_of_buffer): Declare default-enable-multibyte-characters. --- src/buffer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 7d1f28ad2c1..97a179e171f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -476,7 +476,6 @@ reset_buffer (b) b->mark_active = Qnil; b->point_before_scroll = Qnil; b->file_format = Qnil; - b->enable_multibyte_characters = Qt; b->last_selected_window = Qnil; b->extra2 = Qnil; b->extra3 = Qnil; @@ -3517,6 +3516,7 @@ init_buffer_once () #ifdef DOS_NT buffer_defaults.buffer_file_type = Qnil; /* TEXT */ #endif + buffer_defaults.enable_multibyte_characters = Qt; XSETFASTINT (buffer_defaults.fill_column, 70); XSETFASTINT (buffer_defaults.left_margin, 0); buffer_defaults.cache_long_line_scans = Qnil; @@ -3546,7 +3546,6 @@ init_buffer_once () XSETINT (buffer_local_flags.file_truename, -1); XSETINT (buffer_local_flags.invisibility_spec, -1); XSETINT (buffer_local_flags.file_format, -1); - XSETINT (buffer_local_flags.enable_multibyte_characters, -1); XSETFASTINT (buffer_local_flags.mode_line_format, 1); XSETFASTINT (buffer_local_flags.abbrev_mode, 2); @@ -3573,6 +3572,9 @@ init_buffer_once () XSETFASTINT (buffer_local_flags.cache_long_line_scans, 0x10000); XSETFASTINT (buffer_local_flags.category_table, 0x20000); XSETFASTINT (buffer_local_flags.direction_reversed, 0x40000); + XSETFASTINT (buffer_local_flags.enable_multibyte_characters, 0x80000); + /* Make this one a permanent local. */ + buffer_permanent_local_flags |= 0x80000; Vbuffer_alist = Qnil; current_buffer = 0; @@ -3718,6 +3720,11 @@ This is the same as (default-value 'ctl-arrow)."); "Default value of `direction_reversed' for buffers that do not override it.\n\ This is the same as (default-value 'direction-reversed)."); + DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", + &buffer_defaults.enable_multibyte_characters, + "Default value of `enable-multibyte-characters' for buffers not overriding it.\n\ + This is the same as (default-value 'enable-multibyte-characters)."); + DEFVAR_LISP_NOPRO ("default-truncate-lines", &buffer_defaults.truncate_lines, "Default value of `truncate-lines' for buffers that do not override it.\n\ -- 2.39.2