set_extent_start (e, -1);
set_extent_end (e, -1);
}
+
+ /* But we need to clear all the lists containing extents or
+ havoc will result. */
+ extent_list_delete_all (data->extents);
}
- /* But we need to clear all the lists containing extents or
- havoc will result. */
- extent_list_delete_all (data->extents);
soe_invalidate (object);
}
}
case ME_ALL_EXTENTS_OPEN: start_open = 1, end_open = 1; break;
case ME_ALL_EXTENTS_CLOSED_OPEN: start_open = 0, end_open = 1; break;
case ME_ALL_EXTENTS_OPEN_CLOSED: start_open = 1, end_open = 0; break;
- default: abort(); return 0;
+ default: ABORT(); return 0;
}
start = buffer_or_string_bytind_to_startind (obj, from,
retval = (start <= exs && exs <= end) || (start <= exe && exe <= end);
break;
default:
- abort(); return 0;
+ ABORT(); return 0;
}
return flags & ME_NEGATE_IN_REGION ? !retval : retval;
}
face_index
extent_fragment_update (struct window *w, struct extent_fragment *ef,
- Bytind pos)
+ Bytind pos, Lisp_Object last_glyph)
{
int i;
+ int seen_glyph = NILP (last_glyph) ? 1 : 0;
Extent_List *sel =
buffer_or_string_stack_of_extents_force (ef->object)->extents;
EXTENT lhe = 0;
if (extent_start (e) == mempos && !NILP (extent_begin_glyph (e)))
{
Lisp_Object glyph = extent_begin_glyph (e);
- struct glyph_block gb;
-
- gb.glyph = glyph;
- XSETEXTENT (gb.extent, e);
- Dynarr_add (ef->begin_glyphs, gb);
+ if (seen_glyph) {
+ struct glyph_block gb;
+
+ gb.glyph = glyph;
+ XSETEXTENT (gb.extent, e);
+ Dynarr_add (ef->begin_glyphs, gb);
+ }
+ else if (EQ (glyph, last_glyph))
+ seen_glyph = 1;
}
}
if (extent_end (e) == mempos && !NILP (extent_end_glyph (e)))
{
Lisp_Object glyph = extent_end_glyph (e);
- struct glyph_block gb;
+ if (seen_glyph) {
+ struct glyph_block gb;
- gb.glyph = glyph;
- XSETEXTENT (gb.extent, e);
- Dynarr_add (ef->end_glyphs, gb);
+ gb.glyph = glyph;
+ XSETEXTENT (gb.extent, e);
+ Dynarr_add (ef->end_glyphs, gb);
+ }
+ else if (EQ (glyph, last_glyph))
+ seen_glyph = 1;
}
}
strcpy (bp, "detached");
else
sprintf (bp, "%ld, %ld",
- (long) XINT (Fextent_start_position (obj)),
- (long) XINT (Fextent_end_position (obj)));
+ XINT (Fextent_start_position (obj)),
+ XINT (Fextent_end_position (obj)));
bp += strlen (bp);
*bp++ = (extent_end_open_p (anc) ? ')': ']');
if (!NILP (extent_end_glyph (anc))) *bp++ = '*';
Lisp_Object obj2 = Qnil;
/* Destroyed extents have 't' in the object field, causing
- extent_object() to abort (maybe). */
+ extent_object() to ABORT (maybe). */
if (EXTENT_LIVE_P (XEXTENT (obj)))
obj2 = extent_object (XEXTENT (obj));
#ifdef ERROR_CHECK_EXTENTS
if (extent_start (extent) > indice &&
extent_start (extent) < indice + closure->length)
- abort ();
+ ABORT ();
if (extent_end (extent) > indice &&
extent_end (extent) < indice + closure->length)
- abort ();
+ ABORT ();
#endif
/* The extent-adjustment code adjusted the extent's endpoints as if
unbind_to (closure.speccount, Qnil). This is because
map_extents_bytind() unbinds before, and with a smaller
speccount. The additional unbind_to() in
- report_extent_modification() would cause XEmacs to abort. */
+ report_extent_modification() would cause XEmacs to ABORT. */
if (closure->speccount == -1)
{
closure->speccount = specpdl_depth ();
case GL_INSIDE_MARGIN: return Qinside_margin;
case GL_WHITESPACE: return Qwhitespace;
default:
- abort ();
+ ABORT ();
return Qnil; /* unreached */
}
}
`inside-margin', or `outside-margin') of the extent's
begin glyph.
- end-glyph-layout The layout policy of the extent's end glyph.
+ end-glyph-layout The layout policy of the extent's end glyph.
+
+ syntax-table A cons or a syntax table object. If a cons, the car must
+ be an integer (interpreted as a syntax code, applicable to
+ all characters in the extent). Otherwise, syntax of
+ characters in the extent is looked up in the syntax table.
+ You should use the text property API to manipulate this
+ property. (This may be required in the future.)
*/
(extent, property, value))
{