summaryrefslogtreecommitdiff
path: root/src/intervals.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2002-06-12 13:29:55 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2002-06-12 13:29:55 +0000
commit91b5390444faade507218117568ae5793b883efd (patch)
tree67ce56ad1348c46334d9dd766b1e28f0d3a9cd4c /src/intervals.c
parent61f7e0f5e50b32afa0f0ffeda009ff1162d45411 (diff)
downloademacs-91b5390444faade507218117568ae5793b883efd.tar.gz
(textget): Don't forget to `return'.
(lookup_char_property): Use XCAR/XCDR.
Diffstat (limited to 'src/intervals.c')
-rw-r--r--src/intervals.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 11a8eccfdfe..bec97d0b3e6 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1813,7 +1813,7 @@ textget (plist, prop)
Lisp_Object plist;
register Lisp_Object prop;
{
- lookup_char_property (plist, prop, 1);
+ return lookup_char_property (plist, prop, 1);
}
Lisp_Object
@@ -1824,15 +1824,15 @@ lookup_char_property (plist, prop, textprop)
{
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);
}
@@ -1845,12 +1845,8 @@ lookup_char_property (plist, prop, textprop)
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;