#include <setjmp.h>
#include "lisp.h"
-#include "buffer.h"
#include "character.h"
+#include "buffer.h"
#include "category.h"
#include "composite.h"
#include "indent.h"
ptrdiff_t width_run_end = from;
ptrdiff_t width_run_width = 0;
Lisp_Object *width_table;
- Lisp_Object buffer;
/* The next buffer pos where we should consult the width run cache. */
ptrdiff_t next_width_run = from;
struct composition_it cmp_it;
- XSETBUFFER (buffer, current_buffer);
XSETWINDOW (window, win);
width_run_cache_on_off ();
struct position *
vmotion (register ptrdiff_t from, register EMACS_INT vtarget, struct window *w)
{
- ptrdiff_t hscroll = XINT (w->hscroll);
+ ptrdiff_t hscroll = w->hscroll;
struct position pos;
/* vpos is cumulative vertical position, changed as from is changed */
register EMACS_INT vpos = 0;
old_buffer = w->buffer;
old_charpos = XMARKER (w->pointm)->charpos;
old_bytepos = XMARKER (w->pointm)->bytepos;
- XSETBUFFER (w->buffer, current_buffer);
- set_marker_both
- (w->pointm, w->buffer, BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
+ WSET (w, buffer, Fcurrent_buffer ());
+ set_marker_both (w->pointm, w->buffer,
+ BUF_PT (current_buffer), BUF_PT_BYTE (current_buffer));
}
if (noninteractive)
if (BUFFERP (old_buffer))
{
- w->buffer = old_buffer;
- set_marker_both (w->pointm, w->buffer, old_charpos, old_bytepos);
+ WSET (w, buffer, old_buffer);
+ set_marker_both (w->pointm, w->buffer,
+ old_charpos, old_bytepos);
}
RETURN_UNGCPRO (make_number (it.vpos));