diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-05-10 15:04:01 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-05-10 15:04:01 +0000 |
commit | 8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e (patch) | |
tree | 6262988e87d6b347a8c90fcc3c5b49f9bb5b36e1 /src/coding.c | |
parent | f6cf85ac95e469835a2643024f995b471a4c5d52 (diff) | |
parent | 9a4d87c8d5f4503d67d5155eae6d543cc31f86d0 (diff) | |
download | emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.tar.gz emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.tar.bz2 emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.zip |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-266
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-267
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-268
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-269
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-270
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-271
Rename "field-at-point" to "field-at-pos"
* emacs@sv.gnu.org/emacs--devo--0--patch-272
(comint-insert-input): Remove redundant calls to setq and goto-char
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
Diffstat (limited to 'src/coding.c')
-rw-r--r-- | src/coding.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/coding.c b/src/coding.c index d261418def5..a83aadfd468 100644 --- a/src/coding.c +++ b/src/coding.c @@ -386,7 +386,9 @@ Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; Lisp_Object eol_mnemonic_undecided; /* Format of end-of-line decided by system. This is CODING_EOL_LF on - Unix, CODING_EOL_CRLF on DOS/Windows, and CODING_EOL_CR on Mac. */ + Unix, CODING_EOL_CRLF on DOS/Windows, and CODING_EOL_CR on Mac. + This has an effect only for external encoding (i.e. for output to + file and process), not for in-buffer or Lisp string encoding. */ int system_eol_type; #ifdef emacs @@ -3920,10 +3922,7 @@ setup_coding_system (coding_system, coding) coding->type = coding_type_no_conversion; coding->category_idx = CODING_CATEGORY_IDX_BINARY; coding->common_flags = 0; - coding->eol_type = NILP (coding_system) ? system_eol_type : CODING_EOL_LF; - if (coding->eol_type != CODING_EOL_LF) - coding->common_flags - |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; + coding->eol_type = CODING_EOL_UNDECIDED; coding->pre_write_conversion = coding->post_read_conversion = Qnil; return NILP (coding_system) ? 0 : -1; } @@ -5000,7 +4999,7 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes) coding->errors = 0; coding->result = CODING_FINISH_NORMAL; if (coding->eol_type == CODING_EOL_UNDECIDED) - coding->eol_type = system_eol_type; + coding->eol_type = CODING_EOL_LF; switch (coding->type) { @@ -5257,8 +5256,6 @@ shrink_encoding_region (beg, end, coding, str) if (coding->type == coding_type_ccl || coding->eol_type == CODING_EOL_CRLF || coding->eol_type == CODING_EOL_CR - || (coding->eol_type == CODING_EOL_UNDECIDED - && system_eol_type != CODING_EOL_LF) || (coding->cmp_data && coding->cmp_data->used > 0)) { /* We can't skip any data. */ @@ -7114,7 +7111,7 @@ code_convert_region1 (start, end, coding_system, encodep) from = XFASTINT (start); to = XFASTINT (end); - if (NILP (coding_system) && system_eol_type == CODING_EOL_LF) + if (NILP (coding_system)) return make_number (to - from); if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) @@ -7169,7 +7166,7 @@ code_convert_string1 (string, coding_system, nocopy, encodep) CHECK_STRING (string); CHECK_SYMBOL (coding_system); - if (NILP (coding_system) && system_eol_type == CODING_EOL_LF) + if (NILP (coding_system)) return (NILP (nocopy) ? Fcopy_sequence (string) : string); if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) @@ -7228,7 +7225,7 @@ code_convert_string_norecord (string, coding_system, encodep) CHECK_STRING (string); CHECK_SYMBOL (coding_system); - if (NILP (coding_system) && system_eol_type == CODING_EOL_LF) + if (NILP (coding_system)) return string; if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) |