diff options
author | Kim F. Storm <storm@cua.dk> | 2005-04-19 08:34:50 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-04-19 08:34:50 +0000 |
commit | f374520488d14e4403a9df52bc751de5e4ab8005 (patch) | |
tree | d584ee18b15450ec128f2cd3d9629b77a1740e49 /src/xfaces.c | |
parent | 7dfe2054bcfec54203ce07dfa570a6e307608d32 (diff) | |
download | emacs-f374520488d14e4403a9df52bc751de5e4ab8005.tar.gz |
(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).
Diffstat (limited to 'src/xfaces.c')
-rw-r--r-- | src/xfaces.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; |