diff src/extents.c @ 195:a2f645c6b9f8 r20-3b24

Import from CVS: tag r20-3b24
author cvs
date Mon, 13 Aug 2007 09:59:05 +0200
parents 489f57a838ef
children 850242ba4a81
line wrap: on
line diff
--- a/src/extents.c	Mon Aug 13 09:58:32 2007 +0200
+++ b/src/extents.c	Mon Aug 13 09:59:05 2007 +0200
@@ -5272,6 +5272,32 @@
   return value;
 }
 
+DEFUN ("set-extent-properties", Fset_extent_properties, 2, 2, 0, /*
+Change some properties of EXTENT.
+PLIST is a property list.
+For a list of built-in properties, see `set-extent-property'.
+*/
+       (extent, plist))
+{
+  /* This function can GC, if one of the properties is `keymap' */
+  Lisp_Object property, value;
+  struct gcpro gcpro1;
+  GCPRO1 (plist);
+
+  plist = Fcopy_sequence (plist);
+  Fcanonicalize_plist (plist, Qnil);
+
+  while (!NILP (plist))
+    {
+      property = Fcar (plist);
+      value = Fcar (Fcdr (plist));
+      plist = Fcdr (Fcdr (plist));
+      Fset_extent_property (extent, property, value);
+    }
+  UNGCPRO;
+  return Qnil;
+}
+
 DEFUN ("extent-property", Fextent_property, 2, 3, 0, /*
 Return EXTENT's value for property PROPERTY.
 See `set-extent-property' for the built-in property names.
@@ -6669,6 +6695,7 @@
   DEFSUBR (Fset_extent_priority);
   DEFSUBR (Fextent_priority);
   DEFSUBR (Fset_extent_property);
+  DEFSUBR (Fset_extent_properties);
   DEFSUBR (Fextent_property);
   DEFSUBR (Fextent_properties);