diff options
| author | Dmitry Antipov | 2012-07-06 09:07:44 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-07-06 09:07:44 +0400 |
| commit | 657924ff58fc22a6e57dc8366a20dadf97324c63 (patch) | |
| tree | 94e256617a34f005119bcf7481bbbaa41c19a63f /src/window.c | |
| parent | 6edc3d285d0495d69888018758371abfa4752327 (diff) | |
| download | emacs-657924ff58fc22a6e57dc8366a20dadf97324c63.tar.gz emacs-657924ff58fc22a6e57dc8366a20dadf97324c63.zip | |
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/window.c')
| -rw-r--r-- | src/window.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index 0f88cbaece9..721b4d98477 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -5911,12 +5911,9 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5911 | is the selected window, then get the value of point from | 5911 | is the selected window, then get the value of point from |
| 5912 | the buffer; pointm is garbage in the selected window. */ | 5912 | the buffer; pointm is garbage in the selected window. */ |
| 5913 | if (EQ (window, selected_window)) | 5913 | if (EQ (window, selected_window)) |
| 5914 | { | 5914 | p->pointm = build_marker (XBUFFER (w->buffer), |
| 5915 | p->pointm = Fmake_marker (); | 5915 | BUF_PT (XBUFFER (w->buffer)), |
| 5916 | set_marker_both (p->pointm, w->buffer, | 5916 | BUF_PT_BYTE (XBUFFER (w->buffer))); |
| 5917 | BUF_PT (XBUFFER (w->buffer)), | ||
| 5918 | BUF_PT_BYTE (XBUFFER (w->buffer))); | ||
| 5919 | } | ||
| 5920 | else | 5917 | else |
| 5921 | p->pointm = Fcopy_marker (w->pointm, Qnil); | 5918 | p->pointm = Fcopy_marker (w->pointm, Qnil); |
| 5922 | XMARKER (p->pointm)->insertion_type | 5919 | XMARKER (p->pointm)->insertion_type |