From: Andreas Schwab Date: Fri, 30 Oct 1998 10:20:25 +0000 (+0000) Subject: (Fbase64_encode_region): Use SET_PT_BOTH instead of SET_PT X-Git-Tag: emacs-20.4~1370 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8b835738fdccc93404786679c12e73742239a0f5;p=emacs.git (Fbase64_encode_region): Use SET_PT_BOTH instead of SET_PT when we have both char and byte position. Fix type clashes. --- diff --git a/src/fns.c b/src/fns.c index 22c9ac41d1f..c60303acec6 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2839,7 +2839,7 @@ into shorter lines.") /* Now we have encoded the region, so we insert the new contents and delete the old. (Insert first in order to preserve markers.) */ - SET_PT (beg); + SET_PT_BOTH (XFASTINT (beg), ibeg); insert (encoded, encoded_length); del_range_byte (ibeg + encoded_length, iend + encoded_length, 1); @@ -2847,8 +2847,8 @@ into shorter lines.") move to the beginning of the region. */ if (old_pos >= XFASTINT (end)) old_pos += encoded_length - (XFASTINT (end) - XFASTINT (beg)); - else if (old_pos > beg) - old_pos = beg; + else if (old_pos > XFASTINT (beg)) + old_pos = XFASTINT (beg); SET_PT (old_pos); /* We return the length of the encoded text. */