From: Kim F. Storm Date: Tue, 19 Apr 2005 08:34:50 +0000 (+0000) Subject: (resolve_face_name): Use Fsafe_get to avoid redisplay X-Git-Tag: ttn-vms-21-2-B4~907 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f374520488d14e4403a9df52bc751de5e4ab8005;p=emacs.git (resolve_face_name): Use Fsafe_get to avoid redisplay loops in case of bad face property lists. Limit number of face alias lookups to 10 (in case of face alias loops). --- diff --git a/src/xfaces.c b/src/xfaces.c index 3ff8917ff91..d8ae7c2af19 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3211,17 +3211,19 @@ resolve_face_name (face_name) Lisp_Object face_name; { Lisp_Object aliased; + int alias_loop_max = 10; if (STRINGP (face_name)) face_name = intern (SDATA (face_name)); while (SYMBOLP (face_name)) { - aliased = Fget (face_name, Qface_alias); + aliased = Fsafe_get (face_name, Qface_alias); if (NILP (aliased)) break; - else - face_name = aliased; + if (--alias_loop_max == 0) + break; + face_name = aliased; } return face_name;