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:
parent
9a9e9ef0e8
commit
3633e3aa59
2 changed files with 16 additions and 0 deletions
11
src/coding.c
11
src/coding.c
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue