aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2004-04-26 00:21:41 +0000
committerMiles Bader2004-04-26 00:21:41 +0000
commite32d987200ff81685dbc52d7ada1692169763fe1 (patch)
treef4ebdcea0a57c2f2344bcbdbffa921a144204dbf /src
parente198ba8711821da8fec10d1ab5d836f058fcf646 (diff)
downloademacs-e32d987200ff81685dbc52d7ada1692169763fe1.tar.gz
emacs-e32d987200ff81685dbc52d7ada1692169763fe1.zip
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h26
-rw-r--r--src/xfaces.c26
2 files changed, 26 insertions, 26 deletions
diff --git a/src/lisp.h b/src/lisp.h
index aa1e0cb8e40..ce5a5c5917e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3185,6 +3185,32 @@ extern Lisp_Object Vdirectory_sep_char;
3185 ? make_float (val) \ 3185 ? make_float (val) \
3186 : make_number ((EMACS_INT)(val))) 3186 : make_number ((EMACS_INT)(val)))
3187 3187
3188
3189/* Checks the `cycle check' variable CHECK to see if it indicates that
3190 EL is part of a cycle; CHECK must be either Qnil or a value returned
3191 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
3192 elements after which a cycle might be suspected; after that many
3193 elements, this macro begins consing in order to keep more precise
3194 track of elements.
3195
3196 Returns nil if a cycle was detected, otherwise a new value for CHECK
3197 that includes EL.
3198
3199 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
3200 the caller should make sure that's ok. */
3201
3202#define CYCLE_CHECK(check, el, suspicious) \
3203 (NILP (check) \
3204 ? make_number (0) \
3205 : (INTEGERP (check) \
3206 ? (XFASTINT (check) < (suspicious) \
3207 ? make_number (XFASTINT (check) + 1) \
3208 : Fcons (el, Qnil)) \
3209 : (!NILP (Fmemq ((el), (check))) \
3210 ? Qnil \
3211 : Fcons ((el), (check)))))
3212
3213
3188#endif /* EMACS_LISP_H */ 3214#endif /* EMACS_LISP_H */
3189 3215
3190/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e 3216/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e
diff --git a/src/xfaces.c b/src/xfaces.c
index b96dd18ec4d..41a329041e7 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3479,32 +3479,6 @@ merge_face_vectors (f, from, to, cycle_check)
3479 to[LFACE_INHERIT_INDEX] = Qnil; 3479 to[LFACE_INHERIT_INDEX] = Qnil;
3480} 3480}
3481 3481
3482
3483/* Checks the `cycle check' variable CHECK to see if it indicates that
3484 EL is part of a cycle; CHECK must be either Qnil or a value returned
3485 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
3486 elements after which a cycle might be suspected; after that many
3487 elements, this macro begins consing in order to keep more precise
3488 track of elements.
3489
3490 Returns nil if a cycle was detected, otherwise a new value for CHECK
3491 that includes EL.
3492
3493 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
3494 the caller should make sure that's ok. */
3495
3496#define CYCLE_CHECK(check, el, suspicious) \
3497 (NILP (check) \
3498 ? make_number (0) \
3499 : (INTEGERP (check) \
3500 ? (XFASTINT (check) < (suspicious) \
3501 ? make_number (XFASTINT (check) + 1) \
3502 : Fcons (el, Qnil)) \
3503 : (!NILP (Fmemq ((el), (check))) \
3504 ? Qnil \
3505 : Fcons ((el), (check)))))
3506
3507
3508/* Merge face attributes from the face on frame F whose name is 3482/* Merge face attributes from the face on frame F whose name is
3509 INHERITS, into the vector of face attributes TO; INHERITS may also be 3483 INHERITS, into the vector of face attributes TO; INHERITS may also be
3510 a list of face names, in which case they are applied in order. 3484 a list of face names, in which case they are applied in order.