summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorGregory Heytings <gregory@heytings.org>2023-02-14 20:22:50 +0000
committerGregory Heytings <gregory@heytings.org>2023-02-14 21:41:35 +0100
commit5206a551c166fc1908edff4fdf1695f7cef3600a (patch)
tree6865a1e4131030a6c32c7551c8441a63ea349bd2 /lisp/emacs-lisp/bytecomp.el
parentaccd88d55455b8c585b162242e6e4ede742afa99 (diff)
downloademacs-5206a551c166fc1908edff4fdf1695f7cef3600a.tar.gz
emacs-5206a551c166fc1908edff4fdf1695f7cef3600a.tar.bz2
emacs-5206a551c166fc1908edff4fdf1695f7cef3600a.zip
Improve backward compatibility of save-restriction
* src/editfns.c (save_restriction_save_1): Renamed from 'save_restrictions_save'. Make it static. (save_restriction_restore_1): Renamed from 'save_restriction_restore'. Make it static. (save_restriction_restore): New function, combining 'save_restriction_save_1' and 'narrowing_locks_save'. (save_restriction_save): New function, combining 'save_restriction_restore_1' and 'narrowing_locks_restore'. (Fsave_restriction): Restore the previous code. (narrowing_locks_save, narrowing_locks_restore): Make them static. * src/lisp.h: Remove two functions that are not externally visible anymore. * src/comp.c (helper_save_restriction): Restore the previous code. * src/bytecode.c (exec_byte_code): Restore the previous code. * lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction): Decrement unbinding count.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c6cda6b588a..5df1205869c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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 2))
+ (byte-compile-out 'byte-unbind 1))
(defun byte-compile-save-current-buffer (form)
(byte-compile-out 'byte-save-current-buffer 0)