Fix 'save-restriction' for narrowing locks

* src/editfns.c (narrowing_locks_save):
(narrowing_locks_restore): Make them non-static.

* src/lisp.h: Make them externally visible.

* src/bytecode.c (exec_byte_code): Save and restore narrowing
locks.

* lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction):
Increment unbinding count.

* src/comp.c (helper_save_restriction): Save and restore narrowing
locks.
This commit is contained in:
Gregory Heytings 2023-02-09 01:09:10 +00:00
parent 0ec0a610ed
commit a4aa32bdff
5 changed files with 9 additions and 3 deletions

View file

@ -4900,7 +4900,7 @@ binding slots have been popped."
(defun byte-compile-save-restriction (form)
(byte-compile-out 'byte-save-restriction 0)
(byte-compile-body-do-effect (cdr form))
(byte-compile-out 'byte-unbind 1))
(byte-compile-out 'byte-unbind 2))
(defun byte-compile-save-current-buffer (form)
(byte-compile-out 'byte-save-current-buffer 0)