comparison src/xfaces.c @ 83123:ad01ab3c6f4d

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-299 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-300 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-301 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-302 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-303 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-304 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-305 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-306 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-307 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-308 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-309 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-310 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-311 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-312 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-313 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-314 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-315 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-316 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-317 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-318 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-319 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-320 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-321 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-322 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-323 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-324 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-163
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 18 May 2004 19:12:15 +0000
parents 1a68e4b22355 edc2b57535e5
children fe5ecb72e304
comparison
equal deleted inserted replaced
83122:d895a49cccb9 83123:ad01ab3c6f4d
3858 3858
3859 3859
3860 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face, 3860 DEFUN ("internal-copy-lisp-face", Finternal_copy_lisp_face,
3861 Sinternal_copy_lisp_face, 4, 4, 0, 3861 Sinternal_copy_lisp_face, 4, 4, 0,
3862 doc: /* Copy face FROM to TO. 3862 doc: /* Copy face FROM to TO.
3863 If FRAME it t, copy the global face definition of FROM to the 3863 If FRAME is t, copy the global face definition of FROM to the
3864 global face definition of TO. Otherwise, copy the frame-local 3864 global face definition of TO. Otherwise, copy the frame-local
3865 definition of FROM on FRAME to the frame-local definition of TO 3865 definition of FROM on FRAME to the frame-local definition of TO
3866 on NEW-FRAME, or FRAME if NEW-FRAME is nil. 3866 on NEW-FRAME, or FRAME if NEW-FRAME is nil.
3867 3867
3868 Value is TO. */) 3868 Value is TO. */)
4685 Sinternal_get_lisp_face_attribute, 4685 Sinternal_get_lisp_face_attribute,
4686 2, 3, 0, 4686 2, 3, 0,
4687 doc: /* Return face attribute KEYWORD of face SYMBOL. 4687 doc: /* Return face attribute KEYWORD of face SYMBOL.
4688 If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid 4688 If SYMBOL does not name a valid Lisp face or KEYWORD isn't a valid
4689 face attribute name, signal an error. 4689 face attribute name, signal an error.
4690 If the optional argument FRAME is given, report on face FACE in that 4690 If the optional argument FRAME is given, report on face SYMBOL in that
4691 frame. If FRAME is t, report on the defaults for face FACE (for new 4691 frame. If FRAME is t, report on the defaults for face SYMBOL (for new
4692 frames). If FRAME is omitted or nil, use the selected frame. */) 4692 frames). If FRAME is omitted or nil, use the selected frame. */)
4693 (symbol, keyword, frame) 4693 (symbol, keyword, frame)
4694 Lisp_Object symbol, keyword, frame; 4694 Lisp_Object symbol, keyword, frame;
4695 { 4695 {
4696 Lisp_Object lface, value = Qnil; 4696 Lisp_Object lface, value = Qnil;
5236 with the default face for display, can be represented in a way that's 5236 with the default face for display, can be represented in a way that's
5237 5237
5238 \(1) different in appearance than the default face, and 5238 \(1) different in appearance than the default face, and
5239 \(2) `close in spirit' to what the attributes specify, if not exact. 5239 \(2) `close in spirit' to what the attributes specify, if not exact.
5240 5240
5241 Point (2) implies that a `:weight black' attribute will be satisified 5241 Point (2) implies that a `:weight black' attribute will be satisfied
5242 by any terminal that can display bold, and a `:foreground "yellow"' as 5242 by any terminal that can display bold, and a `:foreground "yellow"' as
5243 long as the terminal can display a yellowish color, but `:slant italic' 5243 long as the terminal can display a yellowish color, but `:slant italic'
5244 will _not_ be satisified by the tty display code's automatic 5244 will _not_ be satisfied by the tty display code's automatic
5245 substitution of a `dim' face for italic. */) 5245 substitution of a `dim' face for italic. */)
5246 (attributes, frame) 5246 (attributes, frame)
5247 Lisp_Object attributes, frame; 5247 Lisp_Object attributes, frame;
5248 { 5248 {
5249 int weight, i; 5249 int weight, i;
5447 #endif /* HAVE_WINDOW_SYSTEM */ 5447 #endif /* HAVE_WINDOW_SYSTEM */
5448 } 5448 }
5449 } 5449 }
5450 5450
5451 5451
5452 /* Free all realized faces in face cache C, including basic faces. C 5452 /* Free all realized faces in face cache C, including basic faces.
5453 may be null. If faces are freed, make sure the frame's current 5453 C may be null. If faces are freed, make sure the frame's current
5454 matrix is marked invalid, so that a display caused by an expose 5454 matrix is marked invalid, so that a display caused by an expose
5455 event doesn't try to use faces we destroyed. */ 5455 event doesn't try to use faces we destroyed. */
5456 5456
5457 static void 5457 static void
5458 free_realized_faces (c) 5458 free_realized_faces (c)
7304 endpos = XINT (end); 7304 endpos = XINT (end);
7305 7305
7306 /* Look at properties from overlays. */ 7306 /* Look at properties from overlays. */
7307 { 7307 {
7308 int next_overlay; 7308 int next_overlay;
7309 int len; 7309
7310 7310 GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, 0);
7311 /* First try with room for 40 overlays. */
7312 len = 40;
7313 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
7314 noverlays = overlays_at (pos, 0, &overlay_vec, &len,
7315 &next_overlay, NULL, 0);
7316
7317 /* If there are more than 40, make enough space for all, and try
7318 again. */
7319 if (noverlays > len)
7320 {
7321 len = noverlays;
7322 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
7323 noverlays = overlays_at (pos, 0, &overlay_vec, &len,
7324 &next_overlay, NULL, 0);
7325 }
7326
7327 if (next_overlay < endpos) 7311 if (next_overlay < endpos)
7328 endpos = next_overlay; 7312 endpos = next_overlay;
7329 } 7313 }
7330 7314
7331 *endptr = endpos; 7315 *endptr = endpos;