summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-06-09 12:58:58 +0000
committerKenichi Handa <handa@m17n.org>1997-06-09 12:58:58 +0000
commitc71b5d9b4978863298cfb28a3b95a267698b1355 (patch)
tree803363315010e8abd0d59119567f9eb65aea83fb /src/buffer.c
parent53dcf39300d26b58088ec09ebf471878d96a8f4a (diff)
downloademacs-c71b5d9b4978863298cfb28a3b95a267698b1355.tar.gz
(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.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c21
1 files changed, 20 insertions, 1 deletions
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",
+ &current_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", &current_buffer->direction_reversed,
Qnil,
"*Non-nil means lines in the buffer are displayed right to left.");