aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2011-12-11 21:08:51 +0900
committerKenichi Handa2011-12-11 21:08:51 +0900
commit3633e3aa59f8df4e12f1b509c952e17dbf205819 (patch)
treeb3bb5defa03c9a42d1007aeeb44e5331c9e91946 /src/coding.c
parent9a9e9ef0e893d770d3c99b7fa9bb9f01ef64847b (diff)
downloademacs-3633e3aa59f8df4e12f1b509c952e17dbf205819.tar.gz
emacs-3633e3aa59f8df4e12f1b509c952e17dbf205819.zip
coding.c (Funencodable_char_position): Pay attention to the buffer text relocation (Bug#9389).
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c
index 50268099413..e15d725af3a 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8756,6 +8756,7 @@ to the string. */)
8756 } 8756 }
8757 8757
8758 positions = Qnil; 8758 positions = Qnil;
8759 charset_map_loaded = 0;
8759 while (1) 8760 while (1)
8760 { 8761 {
8761 int c; 8762 int c;
@@ -8783,6 +8784,16 @@ to the string. */)
8783 } 8784 }
8784 8785
8785 from++; 8786 from++;
8787 if (charset_map_loaded && NILP (string))
8788 {
8789 p = CHAR_POS_ADDR (from);
8790 pend = CHAR_POS_ADDR (to);
8791 if (from < GPT && to >= GPT)
8792 stop = GPT_ADDR;
8793 else
8794 stop = pend;
8795 charset_map_loaded = 0;
8796 }
8786 } 8797 }
8787 8798
8788 return (NILP (count) ? Fcar (positions) : Fnreverse (positions)); 8799 return (NILP (count) ? Fcar (positions) : Fnreverse (positions));