HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Miscellanous cleanups in preparation for the merge.
[bpt/emacs.git]
/
src
/
marker.c
diff --git
a/src/marker.c
b/src/marker.c
index
9c56e43
..
7d46109
100644
(file)
--- a/
src/marker.c
+++ b/
src/marker.c
@@
-1,6
+1,5
@@
/* Markers: examining, setting and deleting.
/* Markers: examining, setting and deleting.
- Copyright (C) 1985, 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1997-1998, 2001-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
This file is part of GNU Emacs.
@@
-34,10
+33,6
@@
static int cached_modiff;
static void byte_char_debug_check (struct buffer *, EMACS_INT, EMACS_INT);
static void byte_char_debug_check (struct buffer *, EMACS_INT, EMACS_INT);
-/* Nonzero means enable debugging checks on byte/char correspondences. */
-
-static int byte_debug_flag;
-
void
clear_charpos_cache (struct buffer *b)
{
void
clear_charpos_cache (struct buffer *b)
{
@@
-262,9
+257,10
@@
verify_bytepos (EMACS_INT charpos)
return below_byte;
}
\f
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 b
uf_b
ytepos_to_charpos.
It is used when BYTEPOS is actually the byte position. */
#define CONSIDER(BYTEPOS, CHARPOS) \
It is used when BYTEPOS is actually the byte position. */
#define CONSIDER(BYTEPOS, CHARPOS) \
@@
-307,12
+303,6
@@
verify_bytepos (EMACS_INT 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)
{
EMACS_INT
buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos)
{
@@
-444,7
+434,7
@@
Returns nil if MARKER points into a dead buffer. */)
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. */
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;
return buf;
}
return Qnil;
@@
-493,7
+483,7
@@
Returns MARKER. */)
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
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;
{
unchain_marker (m);
return marker;
@@
-568,7
+558,7
@@
set_marker_restricted (Lisp_Object marker, Lisp_Object pos, Lisp_Object buffer)
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
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;
{
unchain_marker (m);
return marker;
@@
-633,7
+623,7
@@
set_marker_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT charpos, EMAC
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
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;
{
unchain_marker (m);
return marker;
@@
-681,7
+671,7
@@
set_marker_restricted_both (Lisp_Object marker, Lisp_Object buffer, EMACS_INT ch
CHECK_BUFFER (buffer);
b = XBUFFER (buffer);
/* If buffer is dead, set marker to point nowhere. */
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;
{
unchain_marker (m);
return marker;
@@
-736,7
+726,7
@@
unchain_marker (register struct Lisp_Marker *marker)
if (b == 0)
return;
if (b == 0)
return;
- if (EQ (
b->name
, Qnil))
+ if (EQ (
BVAR (b, name)
, Qnil))
abort ();
marker->buffer = 0;
abort ();
marker->buffer = 0;
@@
-897,10
+887,7
@@
syms_of_marker (void)
defsubr (&Sset_marker_insertion_type);
defsubr (&Sbuffer_has_markers_at);
defsubr (&Sset_marker_insertion_type);
defsubr (&Sbuffer_has_markers_at);
- DEFVAR_BOOL ("byte-debug-flag",
&
byte_debug_flag,
+ DEFVAR_BOOL ("byte-debug-flag", byte_debug_flag,
doc: /* Non-nil enables debugging checks in byte/char position conversions. */);
byte_debug_flag = 0;
}
doc: /* Non-nil enables debugging checks in byte/char position conversions. */);
byte_debug_flag = 0;
}
-
-/* arch-tag: 50aa418f-cdd0-4838-b64b-94aa4b2a3b74
- (do not change this comment) */