1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 11:50:38 -08:00

coding.c (Funencodable_char_position): Pay attention to the buffer text relocation (Bug#9389).

This commit is contained in:
Kenichi Handa 2011-12-11 21:08:51 +09:00
parent 9a9e9ef0e8
commit 3633e3aa59
2 changed files with 16 additions and 0 deletions

View file

@ -8756,6 +8756,7 @@ to the string. */)
}
positions = Qnil;
charset_map_loaded = 0;
while (1)
{
int c;
@ -8783,6 +8784,16 @@ to the string. */)
}
from++;
if (charset_map_loaded && NILP (string))
{
p = CHAR_POS_ADDR (from);
pend = CHAR_POS_ADDR (to);
if (from < GPT && to >= GPT)
stop = GPT_ADDR;
else
stop = pend;
charset_map_loaded = 0;
}
}
return (NILP (count) ? Fcar (positions) : Fnreverse (positions));