+2010-04-30 Andreas Schwab <schwab@linux-m68k.org>
+
+ * composite.c (autocmp_chars): Save point as marker before calling
+ auto-composition-function (Bug#5984).
+
+ * lisp.h (restore_point_unwind): Add prototype.
+
+ * fileio.c (restore_point_unwind): Remove static attribute.
+
2010-04-23 Kenichi Handa <handa@m17n.org>
* ftfont.c (M17N_FLT_USE_NEW_FEATURE): Define it if we can use the
{
Lisp_Object args[6];
+ /* Save point as marker before calling out to lisp. */
+ if (NILP (string))
+ {
+ Lisp_Object m = Fmake_marker ();
+ set_marker_both (m, Qnil, pt, pt_byte);
+ record_unwind_protect (restore_point_unwind, m);
+ }
+
args[0] = Vauto_composition_function;
args[1] = AREF (elt, 2);
args[2] = pos;
args[5] = string;
gstring = safe_call (6, args);
}
- if (NILP (string))
- TEMP_SET_PT_BOTH (pt, pt_byte);
+ else if (NILP (string))
+ {
+ TEMP_SET_PT_BOTH (pt, pt_byte);
+ }
return unbind_to (count, gstring);
}
}
/* Restore point, having saved it as a marker. */
-static Lisp_Object
+Lisp_Object
restore_point_unwind (location)
Lisp_Object location;
{
EXFUN (Ffile_executable_p, 1);
EXFUN (Fread_file_name, 6);
extern Lisp_Object close_file_unwind P_ ((Lisp_Object));
+extern Lisp_Object restore_point_unwind P_ ((Lisp_Object));
extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
extern int internal_delete_file P_ ((Lisp_Object));
extern void syms_of_fileio P_ ((void));