aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2010-04-30 12:00:48 -0400
committerChong Yidong2010-04-30 12:00:48 -0400
commit5dcde606e32d1794f8268ea51cd2d1746e45a311 (patch)
tree2b6048930549ed5862366c766d73a611e4e1669c /src
parent9822590ba8018dd651a01081957d6fb60191d38f (diff)
downloademacs-5dcde606e32d1794f8268ea51cd2d1746e45a311.tar.gz
emacs-5dcde606e32d1794f8268ea51cd2d1746e45a311.zip
Fix for Bug#5984.
* composite.c (autocmp_chars): Save point as marker before calling auto-composition-function. * lisp.h (restore_point_unwind): Add prototype. * fileio.c (restore_point_unwind): Remove static attribute.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/composite.c14
-rw-r--r--src/fileio.c2
-rw-r--r--src/lisp.h1
4 files changed, 23 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d061857bc3a..29506bee67e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12010-04-30 Andreas Schwab <schwab@linux-m68k.org>
2
3 * composite.c (autocmp_chars): Save point as marker before calling
4 auto-composition-function (Bug#5984).
5
6 * lisp.h (restore_point_unwind): Add prototype.
7
8 * fileio.c (restore_point_unwind): Remove static attribute.
9
12010-04-23 Kenichi Handa <handa@m17n.org> 102010-04-23 Kenichi Handa <handa@m17n.org>
2 11
3 * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the 12 * ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
diff --git a/src/composite.c b/src/composite.c
index 632c9f90d12..1295a03e9f6 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -990,6 +990,14 @@ autocmp_chars (cft_element, charpos, bytepos, limit, win, face, string)
990 { 990 {
991 Lisp_Object args[6]; 991 Lisp_Object args[6];
992 992
993 /* Save point as marker before calling out to lisp. */
994 if (NILP (string))
995 {
996 Lisp_Object m = Fmake_marker ();
997 set_marker_both (m, Qnil, pt, pt_byte);
998 record_unwind_protect (restore_point_unwind, m);
999 }
1000
993 args[0] = Vauto_composition_function; 1001 args[0] = Vauto_composition_function;
994 args[1] = AREF (elt, 2); 1002 args[1] = AREF (elt, 2);
995 args[2] = pos; 1003 args[2] = pos;
@@ -998,8 +1006,10 @@ autocmp_chars (cft_element, charpos, bytepos, limit, win, face, string)
998 args[5] = string; 1006 args[5] = string;
999 gstring = safe_call (6, args); 1007 gstring = safe_call (6, args);
1000 } 1008 }
1001 if (NILP (string)) 1009 else if (NILP (string))
1002 TEMP_SET_PT_BOTH (pt, pt_byte); 1010 {
1011 TEMP_SET_PT_BOTH (pt, pt_byte);
1012 }
1003 return unbind_to (count, gstring); 1013 return unbind_to (count, gstring);
1004 } 1014 }
1005 } 1015 }
diff --git a/src/fileio.c b/src/fileio.c
index a80ba11bcab..440a726b26b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -302,7 +302,7 @@ close_file_unwind (fd)
302 302
303/* Restore point, having saved it as a marker. */ 303/* Restore point, having saved it as a marker. */
304 304
305static Lisp_Object 305Lisp_Object
306restore_point_unwind (location) 306restore_point_unwind (location)
307 Lisp_Object location; 307 Lisp_Object location;
308{ 308{
diff --git a/src/lisp.h b/src/lisp.h
index 7f5d5df66c6..6cbf35c7880 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3018,6 +3018,7 @@ EXFUN (Ffile_readable_p, 1);
3018EXFUN (Ffile_executable_p, 1); 3018EXFUN (Ffile_executable_p, 1);
3019EXFUN (Fread_file_name, 6); 3019EXFUN (Fread_file_name, 6);
3020extern Lisp_Object close_file_unwind P_ ((Lisp_Object)); 3020extern Lisp_Object close_file_unwind P_ ((Lisp_Object));
3021extern Lisp_Object restore_point_unwind P_ ((Lisp_Object));
3021extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN; 3022extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
3022extern int internal_delete_file P_ ((Lisp_Object)); 3023extern int internal_delete_file P_ ((Lisp_Object));
3023extern void syms_of_fileio P_ ((void)); 3024extern void syms_of_fileio P_ ((void));