From 931285e29dea839234cb8276fea6c621c8163a96 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 20 May 2004 17:33:35 +0000 Subject: [PATCH] (lookup_char_property): Do not prematurely return nil. --- src/ChangeLog | 4 ++++ src/intervals.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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; -- 2.39.2