From 28e6fb6637c2a7249364a299cb07f0fc33d1b1ec Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Sat, 9 Sep 2000 13:14:56 +0000 Subject: [PATCH] (CYCLE_CHECK): Don't use the Lisp_Object returned by Fmemq in a condition. --- src/ChangeLog | 5 +++++ src/xfaces.c | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b337d3a1b3f..1c4ef8951a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-09-09 Gerd Moellmann + + * xfaces.c (CYCLE_CHECK): Don't use the Lisp_Object returned + by Fmemq in a condition. + 2000-09-08 Stefan Monnier * xfaces.c (Finternal_set_lisp_face_attribute): Minor thinko. diff --git a/src/xfaces.c b/src/xfaces.c index 22530657c18..b3856127d9d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3195,16 +3195,16 @@ merge_face_vectors (f, from, to, cycle_check) CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so the caller should make sure that's ok. */ -#define CYCLE_CHECK(check, el, suspicious) \ - (NILP (check) \ - ? make_number (0) \ - : INTEGERP (check) \ - ? (XFASTINT (check) < (suspicious) \ - ? make_number (XFASTINT (check) + 1) \ - : Fcons (el, Qnil)) \ - : Fmemq ((el), (check)) \ - ? Qnil \ - : Fcons ((el), (check))) +#define CYCLE_CHECK(check, el, suspicious) \ + (NILP (check) \ + ? make_number (0) \ + : (INTEGERP (check) \ + ? (XFASTINT (check) < (suspicious) \ + ? make_number (XFASTINT (check) + 1) \ + : Fcons (el, Qnil)) \ + : (!NILP (Fmemq ((el), (check))) \ + ? Qnil \ + : Fcons ((el), (check))))) /* Merge face attributes from the face on frame F whose name is -- 2.39.5