diff options
author | Gregory Heytings <gregory@heytings.org> | 2022-08-01 19:11:01 +0000 |
---|---|---|
committer | Gregory Heytings <gregory@heytings.org> | 2022-08-01 21:11:49 +0200 |
commit | 9d8a6c82838f2f24e76a67379b02956aa668d7cf (patch) | |
tree | 4c2a1c40d39de489d90575d13efffcee13955a94 /lisp/emacs-lisp | |
parent | c2ed2e68586098b600ff10a85e882ceb9eeb0c32 (diff) | |
download | emacs-9d8a6c82838f2f24e76a67379b02956aa668d7cf.tar.gz emacs-9d8a6c82838f2f24e76a67379b02956aa668d7cf.tar.bz2 emacs-9d8a6c82838f2f24e76a67379b02956aa668d7cf.zip |
Fix the bytecode incompatibility due to the change to 'narrow-to-region'.
* src/editfns.c (narrow_to_region_internal): New function, which
contains the body previously in 'Fnarrow_to_region' but accepts
a third argument.
(Fnarrow_to_region): Use the new function. Update the docstring.
(Fwiden): Update the docstring.
* src/lisp.h: Prototype of the new function.
* src/xdisp.c (handle_fontified_prop): Use the new function instead
of 'Fnarrow_to_region'.
* src/process.c (Finternal_default_process_filter):
* src/lread.c (readevalloop): Remove the third argument to
'Fnarrow_to_region'.
* src/bytecode.c (exec_byte_code):
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst):
* lisp/emacs-lisp/bytecomp.el: Restore the statu quo ante.
* etc/NEWS: Remove the entry about the new optional argument.
* doc/lispref/positions.texi (Narrowing): Update the documentation.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/comp.el | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1ecd77f7517..b4954eee9ff 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -767,7 +767,7 @@ Each element is (INDEX . VALUE)") (byte-defop 122 0 byte-char-syntax) (byte-defop 123 -1 byte-buffer-substring) (byte-defop 124 -1 byte-delete-region) -(byte-defop 125 -2 byte-narrow-to-region) +(byte-defop 125 -1 byte-narrow-to-region) (byte-defop 126 1 byte-widen) (byte-defop 127 0 byte-end-of-line) @@ -3833,7 +3833,7 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\"" (byte-defop-compiler setcdr 2) (byte-defop-compiler buffer-substring 2) (byte-defop-compiler delete-region 2) -(byte-defop-compiler narrow-to-region 2-3) +(byte-defop-compiler narrow-to-region 2) (byte-defop-compiler (% byte-rem) 2) (byte-defop-compiler aset 3) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 4354ea03a4e..5ee10fcbca2 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1915,7 +1915,10 @@ and the annotation emission." (byte-char-syntax auto) (byte-buffer-substring auto) (byte-delete-region auto) - (byte-narrow-to-region auto) + (byte-narrow-to-region + (comp-emit-set-call (comp-call 'narrow-to-region + (comp-slot) + (comp-slot+1)))) (byte-widen (comp-emit-set-call (comp-call 'widen))) (byte-end-of-line auto) |