Mercurial > emacs
diff src/composite.c @ 108361:c1fe9f79424a
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.
| author | Chong Yidong <cyd@stupidchicken.com> |
|---|---|
| date | Fri, 30 Apr 2010 12:00:48 -0400 |
| parents | 0d5d2e53a07c |
| children | 973b5bc5fcfe 376148b31b5e |
line wrap: on
line diff
--- a/src/composite.c Wed Apr 28 21:38:12 2010 -0500 +++ b/src/composite.c Fri Apr 30 12:00:48 2010 -0400 @@ -990,6 +990,14 @@ { 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; @@ -998,8 +1006,10 @@ 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); } }
