comparison src/buffer.c @ 18178:b45b431879bf

(init_buffer_once): Inititialize the member buffer_file_coding_system. (syms_of_buffer): Declare Lisp variables default-buffer-file-coding-system and buffer-file-coding-system.
author Kenichi Handa <handa@m17n.org>
date Mon, 09 Jun 1997 12:58:58 +0000
parents bc690c1e1950
children 9f5626727351
comparison
equal deleted inserted replaced
18177:cf5b766b9da2 18178:b45b431879bf
3561 3561
3562 #ifdef DOS_NT 3562 #ifdef DOS_NT
3563 buffer_defaults.buffer_file_type = Qnil; /* TEXT */ 3563 buffer_defaults.buffer_file_type = Qnil; /* TEXT */
3564 #endif 3564 #endif
3565 buffer_defaults.enable_multibyte_characters = Qt; 3565 buffer_defaults.enable_multibyte_characters = Qt;
3566 buffer_defaults.buffer_file_coding_system = Qnil;
3566 XSETFASTINT (buffer_defaults.fill_column, 70); 3567 XSETFASTINT (buffer_defaults.fill_column, 70);
3567 XSETFASTINT (buffer_defaults.left_margin, 0); 3568 XSETFASTINT (buffer_defaults.left_margin, 0);
3568 buffer_defaults.cache_long_line_scans = Qnil; 3569 buffer_defaults.cache_long_line_scans = Qnil;
3569 buffer_defaults.file_truename = Qnil; 3570 buffer_defaults.file_truename = Qnil;
3570 XSETFASTINT (buffer_defaults.display_count, 0); 3571 XSETFASTINT (buffer_defaults.display_count, 0);
3621 XSETFASTINT (buffer_local_flags.category_table, 0x20000); 3622 XSETFASTINT (buffer_local_flags.category_table, 0x20000);
3622 XSETFASTINT (buffer_local_flags.direction_reversed, 0x40000); 3623 XSETFASTINT (buffer_local_flags.direction_reversed, 0x40000);
3623 XSETFASTINT (buffer_local_flags.enable_multibyte_characters, 0x80000); 3624 XSETFASTINT (buffer_local_flags.enable_multibyte_characters, 0x80000);
3624 /* Make this one a permanent local. */ 3625 /* Make this one a permanent local. */
3625 buffer_permanent_local_flags |= 0x80000; 3626 buffer_permanent_local_flags |= 0x80000;
3626 3627 XSETFASTINT (buffer_local_flags.buffer_file_coding_system, 0x100000);
3628 /* Make this one a permanent local. */
3629 buffer_permanent_local_flags |= 0x100000;
3630
3627 Vbuffer_alist = Qnil; 3631 Vbuffer_alist = Qnil;
3628 current_buffer = 0; 3632 current_buffer = 0;
3629 all_buffers = 0; 3633 all_buffers = 0;
3630 3634
3631 QSFundamental = build_string ("Fundamental"); 3635 QSFundamental = build_string ("Fundamental");
3770 3774
3771 DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters", 3775 DEFVAR_LISP_NOPRO ("default-enable-multibyte-characters",
3772 &buffer_defaults.enable_multibyte_characters, 3776 &buffer_defaults.enable_multibyte_characters,
3773 "Default value of `enable-multibyte-characters' for buffers not overriding it.\n\ 3777 "Default value of `enable-multibyte-characters' for buffers not overriding it.\n\
3774 This is the same as (default-value 'enable-multibyte-characters)."); 3778 This is the same as (default-value 'enable-multibyte-characters).");
3779
3780 DEFVAR_LISP_NOPRO ("default-buffer-file-coding-system",
3781 &buffer_defaults.buffer_file_coding_system,
3782 "Default value of `buffer-file-coding-system' for buffers not overriding it.\n\
3783 This is the same as (default-value 'buffer-file-coding-system).");
3775 3784
3776 DEFVAR_LISP_NOPRO ("default-truncate-lines", 3785 DEFVAR_LISP_NOPRO ("default-truncate-lines",
3777 &buffer_defaults.truncate_lines, 3786 &buffer_defaults.truncate_lines,
3778 "Default value of `truncate-lines' for buffers that do not override it.\n\ 3787 "Default value of `truncate-lines' for buffers that do not override it.\n\
3779 This is the same as (default-value 'truncate-lines)."); 3788 This is the same as (default-value 'truncate-lines).");
3893 DEFVAR_PER_BUFFER ("enable-multibyte-characters", 3902 DEFVAR_PER_BUFFER ("enable-multibyte-characters",
3894 &current_buffer->enable_multibyte_characters, Qnil, 3903 &current_buffer->enable_multibyte_characters, Qnil,
3895 "Non-nil means the buffer contents are regarded as multi-byte form\n\ 3904 "Non-nil means the buffer contents are regarded as multi-byte form\n\
3896 of characters, not a binary code. This affects the display, file I/O,\n\ 3905 of characters, not a binary code. This affects the display, file I/O,\n\
3897 and behaviors of various editing commands."); 3906 and behaviors of various editing commands.");
3907
3908 DEFVAR_PER_BUFFER ("buffer-file-coding-system",
3909 &current_buffer->buffer_file_coding_system, Qnil,
3910 "Coding system to be used for encoding the buffer contents on saving.\n\
3911 If it is nil, the buffer is saved without any code conversion unless\n\
3912 some coding system is specified in file-coding-system-alist\n\
3913 for the buffer file.\n\
3914 \n\
3915 This variable is never applied to a way of decoding\n\
3916 a file while reading it.");
3898 3917
3899 DEFVAR_PER_BUFFER ("direction-reversed", &current_buffer->direction_reversed, 3918 DEFVAR_PER_BUFFER ("direction-reversed", &current_buffer->direction_reversed,
3900 Qnil, 3919 Qnil,
3901 "*Non-nil means lines in the buffer are displayed right to left."); 3920 "*Non-nil means lines in the buffer are displayed right to left.");
3902 3921