use dynwind_begin and dynwind_end
[bpt/emacs.git] / src / textprop.c
index bd09304..d7b58c9 100644 (file)
@@ -812,7 +812,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.  */)
   else
     {
       Lisp_Object initial_value, value;
-      ptrdiff_t count = SPECPDL_INDEX ();
+      dynwind_begin ();
 
       if (! NILP (object))
        CHECK_BUFFER (object);
@@ -853,7 +853,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT.  */)
              break;
          }
 
-      unbind_to (count, Qnil);
+      dynwind_end ();
     }
 
   return position;
@@ -895,7 +895,7 @@ position LIMIT; return LIMIT if nothing is found before reaching LIMIT.  */)
     }
   else
     {
-      ptrdiff_t count = SPECPDL_INDEX ();
+      dynwind_begin ();
 
       if (! NILP (object))
        CHECK_BUFFER (object);
@@ -946,7 +946,7 @@ position LIMIT; return LIMIT if nothing is found before reaching LIMIT.  */)
            }
        }
 
-      unbind_to (count, Qnil);
+      dynwind_end ();
     }
 
   return position;
@@ -1202,7 +1202,7 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
       do
        {
          if (got >= len)
-           RETURN_UNGCPRO (Qnil);
+           return Qnil;
          len -= got;
          i = next_interval (i);
          got = LENGTH (i);
@@ -2332,6 +2332,8 @@ report_interval_modification (Lisp_Object start, Lisp_Object end)
 void
 syms_of_textprop (void)
 {
+#include "textprop.x"
+
   DEFVAR_LISP ("default-text-properties", Vdefault_text_properties,
               doc: /* Property-list used as default values.
 The value of a property in this list is seen as the value for every
@@ -2397,25 +2399,4 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
   DEFSYM (Qmouse_entered, "mouse-entered");
   DEFSYM (Qpoint_left, "point-left");
   DEFSYM (Qpoint_entered, "point-entered");
-
-  defsubr (&Stext_properties_at);
-  defsubr (&Sget_text_property);
-  defsubr (&Sget_char_property);
-  defsubr (&Sget_char_property_and_overlay);
-  defsubr (&Snext_char_property_change);
-  defsubr (&Sprevious_char_property_change);
-  defsubr (&Snext_single_char_property_change);
-  defsubr (&Sprevious_single_char_property_change);
-  defsubr (&Snext_property_change);
-  defsubr (&Snext_single_property_change);
-  defsubr (&Sprevious_property_change);
-  defsubr (&Sprevious_single_property_change);
-  defsubr (&Sadd_text_properties);
-  defsubr (&Sput_text_property);
-  defsubr (&Sset_text_properties);
-  defsubr (&Sadd_face_text_property);
-  defsubr (&Sremove_text_properties);
-  defsubr (&Sremove_list_of_text_properties);
-  defsubr (&Stext_property_any);
-  defsubr (&Stext_property_not_all);
 }