]> git.eshelyaron.com Git - emacs.git/commitdiff
fix missing byte-save-restriction op
authorAndrea Corallo <akrl@sdf.org>
Sat, 9 Nov 2019 10:43:16 +0000 (11:43 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:01 +0000 (11:38 +0100)
lisp/emacs-lisp/comp.el
src/comp.c

index 2afbae56261691d973f75df93166a2f125bde825..813c826501f9e9914e1986a726222c8eb25dc313 100644 (file)
@@ -932,7 +932,7 @@ the annotation emission."
        (comp-emit (comp-call 'record_unwind_protect_excursion)))
       (byte-save-window-excursion-OBSOLETE)
       (byte-save-restriction
-       (comp-call 'helper-save-restriction))
+       (comp-emit (comp-call 'helper_save_restriction)))
       (byte-catch) ;; Obsolete
       (byte-unwind-protect
        (comp-emit (comp-call 'helper_unwind_protect (comp-slot+1))))
index 1aa0636c5b7052de17a1ad1638619cfa8fe34fd8..4afba1183f33a2fdae3fa3bbd2684eed74d8a816 100644 (file)
@@ -183,6 +183,7 @@ Lisp_Object helper_save_window_excursion (Lisp_Object v1);
 void helper_unwind_protect (Lisp_Object handler);
 Lisp_Object helper_temp_output_buffer_setup (Lisp_Object x);
 Lisp_Object helper_unbind_n (Lisp_Object n);
+void helper_save_restriction (void);
 bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code);
 
 \f
@@ -1695,6 +1696,8 @@ declare_runtime_imported_funcs (void)
   args[0] = comp.lisp_obj_type;
   ADD_IMPORTED ("helper_unbind_n", comp.lisp_obj_type, 1, args);
 
+  ADD_IMPORTED ("helper_save_restriction", comp.void_type, 0, NULL);
+
   ADD_IMPORTED ("record_unwind_current_buffer", comp.void_type, 0, NULL);
 
   args[0] = args[1] = args[2] = comp.lisp_obj_type;
@@ -3109,6 +3112,13 @@ helper_unbind_n (Lisp_Object n)
   return unbind_to (SPECPDL_INDEX () - XFIXNUM (n), Qnil);
 }
 
+void
+helper_save_restriction (void)
+{
+  record_unwind_protect (save_restriction_restore,
+                        save_restriction_save ());
+}
+
 bool
 helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code)
 {
@@ -3194,6 +3204,9 @@ load_comp_unit (dynlib_handle_ptr handle)
        } else if (!strcmp (f_str, "helper_unbind_n"))
        {
          f_relocs[i] = (void *) helper_unbind_n;
+       } else if (!strcmp (f_str, "helper_save_restriction"))
+       {
+         f_relocs[i] = (void *) helper_save_restriction;
        } else if (!strcmp (f_str, "record_unwind_current_buffer"))
        {
          f_relocs[i] = (void *) record_unwind_current_buffer;