return below_byte;
}
\f
-/* bytepos_to_charpos returns the char position corresponding to BYTEPOS. */
+/* buf_bytepos_to_charpos returns the char position corresponding to
+ BYTEPOS. */
-/* This macro is a subroutine of bytepos_to_charpos.
+/* This macro is a subroutine of buf_bytepos_to_charpos.
It is used when BYTEPOS is actually the byte position. */
#define CONSIDER(BYTEPOS, CHARPOS) \
} \
}
-EMACS_INT
-bytepos_to_charpos (EMACS_INT bytepos)
-{
- return buf_bytepos_to_charpos (current_buffer, bytepos);
-}
-
EMACS_INT
buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos)
{
does not preserve the buffer from being GC'd (it's weak), so
markers have to be unlinked from their buffer as soon as the buffer
is killed. */
- eassert (!NILP (XBUFFER (buf)->name));
+ eassert (!NILP (BVAR (XBUFFER (buf), name)));
return buf;
}
return Qnil;
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
- if (EQ (b->name, Qnil))
+ if (EQ (BVAR (b, name), Qnil))
{
unchain_marker (m);
return marker;
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
- if (EQ (b->name, Qnil))
+ if (EQ (BVAR (b, name), Qnil))
{
unchain_marker (m);
return marker;
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
- if (EQ (b->name, Qnil))
+ if (EQ (BVAR (b, name), Qnil))
{
unchain_marker (m);
return marker;
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
- if (EQ (b->name, Qnil))
+ if (EQ (BVAR (b, name), Qnil))
{
unchain_marker (m);
return marker;
if (b == 0)
return;
- if (EQ (b->name, Qnil))
+ if (EQ (BVAR (b, name), Qnil))
abort ();
marker->buffer = 0;
doc: /* Non-nil enables debugging checks in byte/char position conversions. */);
byte_debug_flag = 0;
}
-