mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 14:02:07 -08:00
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
This commit is contained in:
commit
8dadeb1e1f
122 changed files with 8155 additions and 5713 deletions
19
src/coding.c
19
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue