+2002-06-12 Stefan Monnier <monnier@cs.yale.edu>
+
+ * intervals.c (textget): Don't forget to `return'.
+ (lookup_char_property): Use XCAR/XCDR.
+
2002-06-12 Juanma Barranquero <lektu@terra.es>
* xdisp.c (Fformat_mode_line): Fix typo.
Lisp_Object plist;
register Lisp_Object prop;
{
- lookup_char_property (plist, prop, 1);
+ return lookup_char_property (plist, prop, 1);
}
Lisp_Object
{
register Lisp_Object tail, fallback = Qnil;
- for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail)))
+ for (tail = plist; CONSP (tail); tail = Fcdr (XCDR (tail)))
{
register Lisp_Object tem;
- tem = Fcar (tail);
+ tem = XCAR (tail);
if (EQ (prop, tem))
- return Fcar (Fcdr (tail));
+ return Fcar (XCDR (tail));
if (EQ (tem, Qcategory))
{
- tem = Fcar (Fcdr (tail));
+ tem = Fcar (XCDR (tail));
if (SYMBOLP (tem))
fallback = Fget (tem, prop);
}
if (NILP (tail))
return tail;
tail = XCDR (tail);
- for (; NILP (fallback) && !NILP (tail); tail = XCDR (tail))
- {
- if (!CONSP (tail))
- wrong_type_argument (Qlistp, tail);
- fallback = Fplist_get (plist, XCAR (tail));
- }
+ for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail))
+ fallback = Fplist_get (plist, XCAR (tail));
if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties))
fallback = Fplist_get (Vdefault_text_properties, prop);
return fallback;