From: Luc Teirlinck Date: Thu, 20 May 2004 17:33:35 +0000 (+0000) Subject: (lookup_char_property): Do not prematurely return nil. X-Git-Tag: ttn-vms-21-2-B4~6123 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=931285e29dea839234cb8276fea6c621c8163a96;p=emacs.git (lookup_char_property): Do not prematurely return nil. --- diff --git a/src/ChangeLog b/src/ChangeLog index c1f0706b928..61fc4bd2a86 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-05-20 Luc Teirlinck + + * intervals.c (lookup_char_property): Do not prematurely return nil. + 2004-05-19 Jim Blandy Add support for new '\_<' and '\_>' regexp operators, matching the diff --git a/src/intervals.c b/src/intervals.c index d3f814d60ce..33ef9a34177 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1899,11 +1899,13 @@ lookup_char_property (plist, prop, textprop) return fallback; /* Check for alternative properties */ tail = Fassq (prop, Vchar_property_alias_alist); - if (NILP (tail)) - return tail; - tail = XCDR (tail); - for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) - fallback = Fplist_get (plist, XCAR (tail)); + if (! NILP (tail)) + { + tail = XCDR (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;