diff options
| author | Karoly Lorentey | 2004-10-03 13:08:55 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-03 13:08:55 +0000 |
| commit | 04ccca970d4a21222cd1f58c7c41983461f009fc (patch) | |
| tree | ae6c3a37beb6a32881b80c42981b891138dd194f /src/coding.c | |
| parent | 181bb49001b52ee593c852377951f8f7b3cf4f38 (diff) | |
| parent | 972a542d5b1101a143ef930f62090fa3feab49f1 (diff) | |
| download | emacs-04ccca970d4a21222cd1f58c7c41983461f009fc.tar.gz emacs-04ccca970d4a21222cd1f58c7c41983461f009fc.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-581
Fix exec-shield autoconf test
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-582
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-583
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-584
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-585
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-586
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-587
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-588
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-589
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-590
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-591
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-592
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-38
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-39
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-40
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-41
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-252
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index 1257771d3ed..58fc587570a 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5646,8 +5646,11 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5646 | coding_allocate_composition_data (coding, from); | 5646 | coding_allocate_composition_data (coding, from); |
| 5647 | } | 5647 | } |
| 5648 | 5648 | ||
| 5649 | /* Try to skip the heading and tailing ASCIIs. */ | 5649 | /* Try to skip the heading and tailing ASCIIs. We can't skip them |
| 5650 | if (coding->type != coding_type_ccl) | 5650 | if we must run CCL program or there are compositions to |
| 5651 | encode. */ | ||
| 5652 | if (coding->type != coding_type_ccl | ||
| 5653 | && (! coding->cmp_data || coding->cmp_data->used == 0)) | ||
| 5651 | { | 5654 | { |
| 5652 | int from_byte_orig = from_byte, to_byte_orig = to_byte; | 5655 | int from_byte_orig = from_byte, to_byte_orig = to_byte; |
| 5653 | 5656 | ||
| @@ -5663,6 +5666,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) | |||
| 5663 | if (!replace) | 5666 | if (!replace) |
| 5664 | /* We must record and adjust for this new text now. */ | 5667 | /* We must record and adjust for this new text now. */ |
| 5665 | adjust_after_insert (from, from_byte_orig, to, to_byte_orig, len); | 5668 | adjust_after_insert (from, from_byte_orig, to, to_byte_orig, len); |
| 5669 | coding_free_composition_data (coding); | ||
| 5666 | return 0; | 5670 | return 0; |
| 5667 | } | 5671 | } |
| 5668 | 5672 | ||
| @@ -6293,13 +6297,19 @@ encode_coding_string (str, coding, nocopy) | |||
| 6293 | if (coding->composing != COMPOSITION_DISABLED) | 6297 | if (coding->composing != COMPOSITION_DISABLED) |
| 6294 | coding_save_composition (coding, from, to, str); | 6298 | coding_save_composition (coding, from, to, str); |
| 6295 | 6299 | ||
| 6296 | /* Try to skip the heading and tailing ASCIIs. */ | 6300 | /* Try to skip the heading and tailing ASCIIs. We can't skip them |
| 6297 | if (coding->type != coding_type_ccl) | 6301 | if we must run CCL program or there are compositions to |
| 6302 | encode. */ | ||
| 6303 | if (coding->type != coding_type_ccl | ||
| 6304 | && (! coding->cmp_data || coding->cmp_data->used == 0)) | ||
| 6298 | { | 6305 | { |
| 6299 | SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str), | 6306 | SHRINK_CONVERSION_REGION (&from, &to_byte, coding, SDATA (str), |
| 6300 | 1); | 6307 | 1); |
| 6301 | if (from == to_byte) | 6308 | if (from == to_byte) |
| 6302 | return (nocopy ? str : Fcopy_sequence (str)); | 6309 | { |
| 6310 | coding_free_composition_data (coding); | ||
| 6311 | return (nocopy ? str : Fcopy_sequence (str)); | ||
| 6312 | } | ||
| 6303 | shrinked_bytes = from + (SBYTES (str) - to_byte); | 6313 | shrinked_bytes = from + (SBYTES (str) - to_byte); |
| 6304 | } | 6314 | } |
| 6305 | 6315 | ||