Skip to content

Commit

Permalink
Add default buffer encoding as initial value for buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
7k8m committed Feb 2, 2019
1 parent aa70611 commit 0f914db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Buffer::Buffer (lisp name, lisp filename, lisp dirname, int temporary)
n = eol_crlf;
b_eol_code = eol_code (n);

lchar_encoding = symbol_value_char_encoding (Vdefault_fileio_encoding);
lchar_encoding = symbol_value_char_encoding (Vdefault_buffer_encoding);

b_selection_type = SELECTION_VOID;
b_selection_point = NO_MARK_SET;
Expand Down
5 changes: 4 additions & 1 deletion src/ces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,11 @@ init_char_encoding ()
xsymbol_value (Qencoding_utf8) = ce;
xsymbol_value (Vencoding_utf8) = ce;

xsymbol_value (Vdefault_fileio_encoding) = xsymbol_value (Vencoding_utf8);
xsymbol_value (Vdefault_fileio_encoding) = xsymbol_value (Vencoding_sjis);
xsymbol_value (Vexpected_fileio_encoding) = xsymbol_value (Vencoding_auto);

xsymbol_value (Vdefault_buffer_encoding) = xsymbol_value(Vencoding_utf8);

}

static lisp
Expand Down
1 change: 1 addition & 0 deletions src/gen-syms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,7 @@ static symbols ed[] =
MAKE_SYMBOL2 (*before-delete-buffer-hook*),
MAKE_SYMBOL2 (*delete-buffer-hook*),
MAKE_SYMBOL2 (*default-fileio-encoding*),
MAKE_SYMBOL2 (*default-buffer-encoding*),
MAKE_SYMBOL2 (*expected-fileio-encoding*),
MAKE_SYMBOL2 (*default-eol-code*),
MAKE_SYMBOL2 (*expected-eol-code*),
Expand Down

0 comments on commit 0f914db

Please sign in to comment.