From: Kenichi Handa Date: Mon, 9 Jun 1997 12:58:58 +0000 (+0000) Subject: (init_buffer_once): Inititialize the member X-Git-Tag: emacs-20.1~1768 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c71b5d9b4978863298cfb28a3b95a267698b1355;p=emacs.git (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. --- diff --git a/src/buffer.c b/src/buffer.c index e3681eb74fe..e220981243f 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3563,6 +3563,7 @@ init_buffer_once () buffer_defaults.buffer_file_type = Qnil; /* TEXT */ #endif buffer_defaults.enable_multibyte_characters = Qt; + buffer_defaults.buffer_file_coding_system = Qnil; XSETFASTINT (buffer_defaults.fill_column, 70); XSETFASTINT (buffer_defaults.left_margin, 0); buffer_defaults.cache_long_line_scans = Qnil; @@ -3623,7 +3624,10 @@ init_buffer_once () XSETFASTINT (buffer_local_flags.enable_multibyte_characters, 0x80000); /* Make this one a permanent local. */ buffer_permanent_local_flags |= 0x80000; - + XSETFASTINT (buffer_local_flags.buffer_file_coding_system, 0x100000); + /* Make this one a permanent local. */ + buffer_permanent_local_flags |= 0x100000; + Vbuffer_alist = Qnil; current_buffer = 0; all_buffers = 0; @@ -3773,6 +3777,11 @@ This is the same as (default-value 'ctl-arrow)."); "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-buffer-file-coding-system", + &buffer_defaults.buffer_file_coding_system, + "Default value of `buffer-file-coding-system' for buffers not overriding it.\n\ + This is the same as (default-value 'buffer-file-coding-system)."); + DEFVAR_LISP_NOPRO ("default-truncate-lines", &buffer_defaults.truncate_lines, "Default value of `truncate-lines' for buffers that do not override it.\n\ @@ -3896,6 +3905,16 @@ in the current display table (if there is one)."); of characters, not a binary code. This affects the display, file I/O,\n\ and behaviors of various editing commands."); + DEFVAR_PER_BUFFER ("buffer-file-coding-system", + ¤t_buffer->buffer_file_coding_system, Qnil, + "Coding system to be used for encoding the buffer contents on saving.\n\ +If it is nil, the buffer is saved without any code conversion unless\n\ +some coding system is specified in file-coding-system-alist\n\ +for the buffer file.\n\ +\n\ +This variable is never applied to a way of decoding\n\ +a file while reading it."); + DEFVAR_PER_BUFFER ("direction-reversed", ¤t_buffer->direction_reversed, Qnil, "*Non-nil means lines in the buffer are displayed right to left.");