Commit cab4777e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Foverlay_get): Handle `category' property on overlay.

parent 6024daef
......@@ -2159,19 +2159,28 @@ DEFUN ("overlay-get", Foverlay_get, Soverlay_get, 2, 2, 0,
(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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment