diff options
| author | Kenichi Handa | 1998-10-31 05:12:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-10-31 05:12:07 +0000 |
| commit | 922dfd866fe0dd058ced1e5203255d0cfc48723f (patch) | |
| tree | 22aadd39ece1e52f0da50750182149ac58858b32 | |
| parent | ef8c3cf90eff8791508a5351f2738e7e0ec09d46 (diff) | |
| download | emacs-922dfd866fe0dd058ced1e5203255d0cfc48723f.tar.gz emacs-922dfd866fe0dd058ced1e5203255d0cfc48723f.zip | |
(Fbase64_decode_region): Fix previous change.
n
| -rw-r--r-- | src/fns.c | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -2990,15 +2990,20 @@ If the region can't be decoded, return nil and don't modify the buffer.") | |||
| 2990 | and delete the old. (Insert first in order to preserve markers.) */ | 2990 | and delete the old. (Insert first in order to preserve markers.) */ |
| 2991 | /* We insert two spaces, then insert the decoded text in between | 2991 | /* We insert two spaces, then insert the decoded text in between |
| 2992 | them, at last, delete those extra two spaces. This is to avoid | 2992 | them, at last, delete those extra two spaces. This is to avoid |
| 2993 | byte combining. */ | 2993 | byte combining while inserting. */ |
| 2994 | TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg); | 2994 | TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg); |
| 2995 | insert_1_both (" ", 2, 2, 0, 1, 0); | 2995 | insert_1_both (" ", 2, 2, 0, 1, 0); |
| 2996 | TEMP_SET_PT_BOTH (XFASTINT (beg) + 1, ibeg + 1); | 2996 | TEMP_SET_PT_BOTH (XFASTINT (beg) + 1, ibeg + 1); |
| 2997 | insert (decoded, decoded_length); | 2997 | insert (decoded, decoded_length); |
| 2998 | inserted_chars = PT - (XFASTINT (beg) + 1); | 2998 | inserted_chars = PT - (XFASTINT (beg) + 1); |
| 2999 | del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars + 2, | 2999 | /* At first delete the original text. This never cause byte |
| 3000 | combining. */ | ||
| 3001 | del_range_both (PT + 1, PT_BYTE + 1, XFASTINT (end) + inserted_chars + 2, | ||
| 3000 | iend + decoded_length + 2, 1); | 3002 | iend + decoded_length + 2, 1); |
| 3001 | del_range_both (XFASTINT (beg), ibeg, XFASTINT (beg) + 1, ibeg + 1, 1); | 3003 | /* Next delete the extra spaces. This will cause byte combining |
| 3004 | error. */ | ||
| 3005 | del_range_both (PT, PT_BYTE, PT + 1, PT_BYTE + 1, 0); | ||
| 3006 | del_range_both (XFASTINT (beg), ibeg, XFASTINT (beg) + 1, ibeg + 1, 0); | ||
| 3002 | inserted_chars = PT - XFASTINT (beg); | 3007 | inserted_chars = PT - XFASTINT (beg); |
| 3003 | 3008 | ||
| 3004 | /* If point was outside of the region, restore it exactly; else just | 3009 | /* If point was outside of the region, restore it exactly; else just |