Merged from miles@gnu.org--gnu-2005 (patch 14-16, 95-106)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96 Move Gnus images into etc/images * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-98 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-99 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-100 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-101 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-102 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-103 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-104 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-106 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15 Update from CVS: lisp/imap.el (imap-log): Doc fix. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16 Merge from emacs--cvs-trunk--0 git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-295
This commit is contained in:
commit
60c73d2ed6
162 changed files with 3974 additions and 1928 deletions
43
src/coding.c
43
src/coding.c
|
@ -6357,7 +6357,12 @@ encode_coding_string (str, coding, nocopy)
|
|||
|
||||
if (SYMBOLP (coding->pre_write_conversion)
|
||||
&& !NILP (Ffboundp (coding->pre_write_conversion)))
|
||||
str = run_pre_post_conversion_on_str (str, coding, 1);
|
||||
{
|
||||
str = run_pre_post_conversion_on_str (str, coding, 1);
|
||||
/* As STR is just newly generated, we don't have to copy it
|
||||
anymore. */
|
||||
nocopy = 1;
|
||||
}
|
||||
|
||||
from = 0;
|
||||
to = SCHARS (str);
|
||||
|
@ -6365,21 +6370,10 @@ encode_coding_string (str, coding, nocopy)
|
|||
|
||||
/* Encoding routines determine the multibyteness of the source text
|
||||
by coding->src_multibyte. */
|
||||
coding->src_multibyte = STRING_MULTIBYTE (str);
|
||||
coding->src_multibyte = SCHARS (str) < SBYTES (str);
|
||||
coding->dst_multibyte = 0;
|
||||
if (! CODING_REQUIRE_ENCODING (coding))
|
||||
{
|
||||
coding->consumed = SBYTES (str);
|
||||
coding->consumed_char = SCHARS (str);
|
||||
if (STRING_MULTIBYTE (str))
|
||||
{
|
||||
str = Fstring_as_unibyte (str);
|
||||
nocopy = 1;
|
||||
}
|
||||
coding->produced = SBYTES (str);
|
||||
coding->produced_char = SCHARS (str);
|
||||
return (nocopy ? str : Fcopy_sequence (str));
|
||||
}
|
||||
goto no_need_of_encoding;
|
||||
|
||||
if (coding->composing != COMPOSITION_DISABLED)
|
||||
coding_save_composition (coding, from, to, str);
|
||||
|
@ -6395,7 +6389,7 @@ encode_coding_string (str, coding, nocopy)
|
|||
if (from == to_byte)
|
||||
{
|
||||
coding_free_composition_data (coding);
|
||||
return (nocopy ? str : Fcopy_sequence (str));
|
||||
goto no_need_of_encoding;
|
||||
}
|
||||
shrinked_bytes = from + (SBYTES (str) - to_byte);
|
||||
}
|
||||
|
@ -6440,6 +6434,25 @@ encode_coding_string (str, coding, nocopy)
|
|||
coding_free_composition_data (coding);
|
||||
|
||||
return newstr;
|
||||
|
||||
no_need_of_encoding:
|
||||
coding->consumed = SBYTES (str);
|
||||
coding->consumed_char = SCHARS (str);
|
||||
if (STRING_MULTIBYTE (str))
|
||||
{
|
||||
if (nocopy)
|
||||
/* We are sure that STR doesn't contain a multibyte
|
||||
character. */
|
||||
STRING_SET_UNIBYTE (str);
|
||||
else
|
||||
{
|
||||
str = Fstring_as_unibyte (str);
|
||||
nocopy = 1;
|
||||
}
|
||||
}
|
||||
coding->produced = SBYTES (str);
|
||||
coding->produced_char = SCHARS (str);
|
||||
return (nocopy ? str : Fcopy_sequence (str));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue