Mercurial > emacs
comparison src/xfaces.c @ 83291:bbf359ec4a59
Merged from miles@gnu.org--gnu-2005 (patch 269)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-269
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-331
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 25 Apr 2005 11:47:55 +0000 |
parents | 042f282a2ed7 a39c60b30e5a |
children | ad07ff6e4555 |
comparison
equal
deleted
inserted
replaced
83290:042f282a2ed7 | 83291:bbf359ec4a59 |
---|---|
3226 static Lisp_Object | 3226 static Lisp_Object |
3227 resolve_face_name (face_name) | 3227 resolve_face_name (face_name) |
3228 Lisp_Object face_name; | 3228 Lisp_Object face_name; |
3229 { | 3229 { |
3230 Lisp_Object aliased; | 3230 Lisp_Object aliased; |
3231 Lisp_Object args[2]; | 3231 int alias_loop_max = 10; |
3232 int c = 0; | |
3233 | 3232 |
3234 if (STRINGP (face_name)) | 3233 if (STRINGP (face_name)) |
3235 face_name = intern (SDATA (face_name)); | 3234 face_name = intern (SDATA (face_name)); |
3236 | 3235 |
3237 /* Protect against loops by limiting the number of indirections. */ | 3236 while (SYMBOLP (face_name)) |
3238 while (SYMBOLP (face_name) && c < 10) | 3237 { |
3239 { | 3238 aliased = Fsafe_get (face_name, Qface_alias); |
3240 /* Fget can signal an error; just ignore it. */ | |
3241 args[0] = face_name; | |
3242 args[1] = Qface_alias; | |
3243 aliased = internal_condition_case_2 (internal_resolve_face_name, 2, args, Qt, | |
3244 resolve_face_name_error); | |
3245 if (NILP (aliased)) | 3239 if (NILP (aliased)) |
3246 break; | 3240 break; |
3247 else | 3241 if (--alias_loop_max == 0) |
3248 face_name = aliased; | 3242 break; |
3249 c++; | 3243 face_name = aliased; |
3250 } | 3244 } |
3251 | 3245 |
3252 return face_name; | 3246 return face_name; |
3253 } | 3247 } |
3254 | 3248 |