aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKarl Heuer1998-02-27 21:55:45 +0000
committerKarl Heuer1998-02-27 21:55:45 +0000
commit1bf08bafe793fe55a71348bcb0c40111183c955c (patch)
tree97abb81c2f70a42dc230866562386bc3a8f515ea /src/buffer.c
parentf00008bc57ee23154ca8d3cd9543810eaf544a82 (diff)
downloademacs-1bf08bafe793fe55a71348bcb0c40111183c955c.tar.gz
emacs-1bf08bafe793fe55a71348bcb0c40111183c955c.zip
(syms_of_buffer): enable-multibyte-characters is read-only.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 323d697f06b..fa01de36a67 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -100,8 +100,11 @@ static Lisp_Object Vbuffer_local_symbols;
100 buffer-local slots. If a slot contains Qnil, then the 100 buffer-local slots. If a slot contains Qnil, then the
101 corresponding buffer slot may contain a value of any type. If a 101 corresponding buffer slot may contain a value of any type. If a
102 slot contains an integer, then prospective values' tags must be 102 slot contains an integer, then prospective values' tags must be
103 equal to that integer. When a tag does not match, the function 103 equal to that integer (except nil is always allowed).
104 buffer_slot_type_mismatch will signal an error. */ 104 When a tag does not match, the function
105 buffer_slot_type_mismatch will signal an error.
106
107 If a slot here contains -1, the corresponding variable is read-only. */
105struct buffer buffer_local_types; 108struct buffer buffer_local_types;
106 109
107/* Flags indicating which built-in buffer-local variables 110/* Flags indicating which built-in buffer-local variables
@@ -520,6 +523,7 @@ reset_buffer (b)
520 XSETINT (b->display_count, 0); 523 XSETINT (b->display_count, 0);
521 b->extra2 = Qnil; 524 b->extra2 = Qnil;
522 b->extra3 = Qnil; 525 b->extra3 = Qnil;
526 b->enable_multibyte_characters = buffer_defaults.enable_multibyte_characters;
523} 527}
524 528
525/* Reset buffer B's local variables info. 529/* Reset buffer B's local variables info.
@@ -3712,7 +3716,8 @@ evaporate_overlays (pos)
3712} 3716}
3713 3717
3714/* Somebody has tried to store a value with an unacceptable type 3718/* Somebody has tried to store a value with an unacceptable type
3715 into the buffer-local slot with offset OFFSET. */ 3719 in the slot with offset OFFSET. */
3720
3716void 3721void
3717buffer_slot_type_mismatch (offset) 3722buffer_slot_type_mismatch (offset)
3718 int offset; 3723 int offset;
@@ -3725,11 +3730,12 @@ buffer_slot_type_mismatch (offset)
3725 case Lisp_Int: type_name = "integers"; break; 3730 case Lisp_Int: type_name = "integers"; break;
3726 case Lisp_String: type_name = "strings"; break; 3731 case Lisp_String: type_name = "strings"; break;
3727 case Lisp_Symbol: type_name = "symbols"; break; 3732 case Lisp_Symbol: type_name = "symbols"; break;
3733
3728 default: 3734 default:
3729 abort (); 3735 abort ();
3730 } 3736 }
3731 3737
3732 error ("only %s should be stored in the buffer-local variable %s", 3738 error ("Only %s should be stored in the buffer-local variable %s",
3733 type_name, XSYMBOL (sym)->name->data); 3739 type_name, XSYMBOL (sym)->name->data);
3734} 3740}
3735 3741
@@ -3818,6 +3824,7 @@ init_buffer_once ()
3818 XSETINT (buffer_local_flags.invisibility_spec, -1); 3824 XSETINT (buffer_local_flags.invisibility_spec, -1);
3819 XSETINT (buffer_local_flags.file_format, -1); 3825 XSETINT (buffer_local_flags.file_format, -1);
3820 XSETINT (buffer_local_flags.display_count, -1); 3826 XSETINT (buffer_local_flags.display_count, -1);
3827 XSETINT (buffer_local_flags.enable_multibyte_characters, -1);
3821 3828
3822 XSETFASTINT (buffer_local_flags.mode_line_format, 1); 3829 XSETFASTINT (buffer_local_flags.mode_line_format, 1);
3823 XSETFASTINT (buffer_local_flags.abbrev_mode, 2); 3830 XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
@@ -3844,12 +3851,9 @@ init_buffer_once ()
3844 XSETFASTINT (buffer_local_flags.cache_long_line_scans, 0x10000); 3851 XSETFASTINT (buffer_local_flags.cache_long_line_scans, 0x10000);
3845 XSETFASTINT (buffer_local_flags.category_table, 0x20000); 3852 XSETFASTINT (buffer_local_flags.category_table, 0x20000);
3846 XSETFASTINT (buffer_local_flags.direction_reversed, 0x40000); 3853 XSETFASTINT (buffer_local_flags.direction_reversed, 0x40000);
3847 XSETFASTINT (buffer_local_flags.enable_multibyte_characters, 0x80000); 3854 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, 0x80000);
3848 /* Make this one a permanent local. */ 3855 /* Make this one a permanent local. */
3849 buffer_permanent_local_flags |= 0x80000; 3856 buffer_permanent_local_flags |= 0x80000;
3850 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, 0x100000);
3851 /* Make this one a permanent local. */
3852 buffer_permanent_local_flags |= 0x100000;
3853 3857
3854 Vbuffer_alist = Qnil; 3858 Vbuffer_alist = Qnil;
3855 current_buffer = 0; 3859 current_buffer = 0;
@@ -4136,7 +4140,8 @@ This variable does not apply to characters whose display is specified\n\
4136in the current display table (if there is one)."); 4140in the current display table (if there is one).");
4137 4141
4138 DEFVAR_PER_BUFFER ("enable-multibyte-characters", 4142 DEFVAR_PER_BUFFER ("enable-multibyte-characters",
4139 &current_buffer->enable_multibyte_characters, Qnil, 4143 &current_buffer->enable_multibyte_characters,
4144 make_number (-1),
4140 "*Non-nil means the buffer contents are regarded as multi-byte form\n\ 4145 "*Non-nil means the buffer contents are regarded as multi-byte form\n\
4141of characters, not a binary code. This affects the display, file I/O,\n\ 4146of characters, not a binary code. This affects the display, file I/O,\n\
4142and behaviors of various editing commands."); 4147and behaviors of various editing commands.");