446 |
}; |
}; |
447 |
|
|
448 |
static struct fringe_bitmap **fringe_bitmaps; |
static struct fringe_bitmap **fringe_bitmaps; |
449 |
static unsigned *fringe_faces; |
static Lisp_Object *fringe_faces; |
450 |
static int max_fringe_bitmaps; |
static int max_fringe_bitmaps; |
451 |
|
|
452 |
static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; |
static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; |
547 |
} |
} |
548 |
|
|
549 |
if (face_id == DEFAULT_FACE_ID) |
if (face_id == DEFAULT_FACE_ID) |
550 |
face_id = fringe_faces[which]; |
{ |
551 |
|
Lisp_Object face; |
552 |
|
|
553 |
|
if ((face = fringe_faces[which], NILP (face)) |
554 |
|
|| (face_id = lookup_named_face (f, face, 'A', 1), face_id < 0)) |
555 |
|
face_id = FRINGE_FACE_ID; |
556 |
|
} |
557 |
|
|
558 |
fb = fringe_bitmaps[which]; |
fb = fringe_bitmaps[which]; |
559 |
if (fb == NULL) |
if (fb == NULL) |
580 |
|
|
581 |
if (p.face == NULL) |
if (p.face == NULL) |
582 |
{ |
{ |
583 |
/* Why does this happen? ++kfs */ |
/* This could happen after clearing face cache. |
584 |
|
But it shouldn't happen anymore. ++kfs */ |
585 |
return; |
return; |
586 |
} |
} |
587 |
|
|
1080 |
{ |
{ |
1081 |
struct fringe_bitmap **fbp; |
struct fringe_bitmap **fbp; |
1082 |
|
|
1083 |
fringe_faces[n] = FRINGE_FACE_ID; |
fringe_faces[n] = Qnil; |
1084 |
|
|
1085 |
fbp = &fringe_bitmaps[n]; |
fbp = &fringe_bitmaps[n]; |
1086 |
if (*fbp && (*fbp)->dynamic) |
if (*fbp && (*fbp)->dynamic) |
1301 |
= ((struct fringe_bitmap **) |
= ((struct fringe_bitmap **) |
1302 |
xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); |
xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); |
1303 |
fringe_faces |
fringe_faces |
1304 |
= (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (unsigned)); |
= (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); |
1305 |
|
|
1306 |
for (; i < max_fringe_bitmaps; i++) |
for (; i < max_fringe_bitmaps; i++) |
1307 |
{ |
{ |
1308 |
fringe_bitmaps[i] = NULL; |
fringe_bitmaps[i] = NULL; |
1309 |
fringe_faces[i] = FRINGE_FACE_ID; |
fringe_faces[i] = Qnil; |
1310 |
} |
} |
1311 |
} |
} |
1312 |
} |
} |
1364 |
if (face_id < 0) |
if (face_id < 0) |
1365 |
error ("No such face"); |
error ("No such face"); |
1366 |
} |
} |
|
else |
|
|
face_id = FRINGE_FACE_ID; |
|
1367 |
|
|
1368 |
fringe_faces[n] = face_id; |
fringe_faces[n] = face; |
1369 |
|
|
1370 |
return Qnil; |
return Qnil; |
1371 |
} |
} |
1439 |
Vfringe_bitmaps = Qnil; |
Vfringe_bitmaps = Qnil; |
1440 |
} |
} |
1441 |
|
|
1442 |
|
/* Garbage collection hook */ |
1443 |
|
|
1444 |
|
void |
1445 |
|
mark_fringe_data () |
1446 |
|
{ |
1447 |
|
int i; |
1448 |
|
|
1449 |
|
for (i = 0; i < max_fringe_bitmaps; i++) |
1450 |
|
if (!NILP (fringe_faces[i])) |
1451 |
|
mark_object (fringe_faces[i]); |
1452 |
|
} |
1453 |
|
|
1454 |
/* Initialize this module when Emacs starts. */ |
/* Initialize this module when Emacs starts. */ |
1455 |
|
|
1456 |
void |
void |
1472 |
fringe_bitmaps |
fringe_bitmaps |
1473 |
= (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct fringe_bitmap *)); |
= (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct fringe_bitmap *)); |
1474 |
fringe_faces |
fringe_faces |
1475 |
= (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (unsigned)); |
= (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object)); |
1476 |
|
|
1477 |
for (i = 0; i < max_fringe_bitmaps; i++) |
for (i = 0; i < max_fringe_bitmaps; i++) |
1478 |
{ |
{ |
1479 |
fringe_bitmaps[i] = NULL; |
fringe_bitmaps[i] = NULL; |
1480 |
fringe_faces[i] = FRINGE_FACE_ID; |
fringe_faces[i] = Qnil; |
1481 |
} |
} |
1482 |
} |
} |
1483 |
|
|