changeset 9211:c7bfa0da167b

(Foverlay_get): Handle `category' property on overlay.
author Richard M. Stallman <rms@gnu.org>
date Sat, 01 Oct 1994 21:02:59 +0000
parents 8d35fd88194d
children 61ae93bdc652
files src/buffer.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/buffer.c	Sat Oct 01 13:27:15 1994 +0000
+++ b/src/buffer.c	Sat Oct 01 21:02:59 1994 +0000
@@ -2159,19 +2159,28 @@
   (overlay, prop)
      Lisp_Object overlay, prop;
 {
-  Lisp_Object plist;
+  Lisp_Object plist, fallback;
 
   CHECK_OVERLAY (overlay, 0);
 
+  fallback = Qnil;
+
   for (plist = Fcdr_safe (XCONS (overlay)->cdr);
        CONSP (plist) && CONSP (XCONS (plist)->cdr);
        plist = XCONS (XCONS (plist)->cdr)->cdr)
     {
       if (EQ (XCONS (plist)->car, prop))
 	return XCONS (XCONS (plist)->cdr)->car;
+      else if (EQ (XCONS (plist)->car, Qcategory))
+	{
+	  Lisp_Object tem;
+	  tem = Fcar (Fcdr (plist));
+	  if (SYMBOLP (tem))
+	    fallback = Fget (tem, prop);
+	}
     }
 
-  return Qnil;
+  return fallback;
 }
 
 DEFUN ("overlay-put", Foverlay_put, Soverlay_put, 3, 3, 0,