summaryrefslogtreecommitdiff
path: root/src/composite.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-07-06 09:07:44 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-07-06 09:07:44 +0400
commit657924ff58fc22a6e57dc8366a20dadf97324c63 (patch)
tree94e256617a34f005119bcf7481bbbaa41c19a63f /src/composite.c
parent6edc3d285d0495d69888018758371abfa4752327 (diff)
downloademacs-657924ff58fc22a6e57dc8366a20dadf97324c63.tar.gz
Introduce fast path for the widely used marker operation.
* alloc.c (build_marker): New function. * lisp.h (build_marker): New prototype. * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it. * composite.c (autocmp_chars): Likewise. * editfns.c (buildmark): Remove. (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker) (save_restriction_save): Use build_marker. * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise. * window.c (save_window_save): Likewise.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/composite.c b/src/composite.c
index 87fad6fa18f..bfc8093a87f 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -951,11 +951,8 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t
/* 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);
- }
+ record_unwind_protect (restore_point_unwind,
+ build_marker (current_buffer, pt, pt_byte));
args[0] = Vauto_composition_function;
args[1] = AREF (rule, 2);