]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle the optional argument of 'narrow-to-region' in byte-compiled code.
authorGregory Heytings <gregory@heytings.org>
Sat, 30 Jul 2022 12:02:28 +0000 (12:02 +0000)
committerGregory Heytings <gregory@heytings.org>
Sat, 30 Jul 2022 12:03:37 +0000 (14:03 +0200)
* lisp/emacs-lisp/bytecomp.el: Adapt the specifications.

* src/bytecode.c (exec_byte_code): Get the optional argument.

lisp/emacs-lisp/bytecomp.el
src/bytecode.c

index b4954eee9ff1164adb4910901d36da98faee4174..1ecd77f7517ec1f93e0b3383c07ac3ba4ddffe8e 100644 (file)
@@ -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 -1 byte-narrow-to-region)
+(byte-defop 125 -2 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)
+(byte-defop-compiler narrow-to-region  2-3)
 (byte-defop-compiler (% byte-rem)      2)
 (byte-defop-compiler aset              3)
 
index 241cbaf04f6ac0bf1f24e23b647d963925174498..2b1eccdc518836a868ddcedd552568299af65d72 100644 (file)
@@ -1480,8 +1480,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
 
        CASE (Bnarrow_to_region):
          {
-           Lisp_Object v1 = POP;
-           TOP = Fnarrow_to_region (TOP, v1, Qnil);
+           Lisp_Object v2 = POP, v1 = POP;
+           TOP = Fnarrow_to_region (TOP, v1, v2);
            NEXT;
          }