Subject: #39709: 28.0.50; [PATCH] substring and the byte compiler

From: Mattias Engdegård <[email-masked]>
Date: Fri, 21 Feb 2020 12:48:01 +0100

The missing 1-3 case seems to be a simple omission -- thanks for spotting it.

+(defun byte-compile-one-to-three-args (form)
+  (let ((len (length form)))
+    (cond ((= len 2) (byte-compile-one-arg form))
+          ((= len 3) (byte-compile-two-args form))
+          ((= len 4) (byte-compile-three-args form))
+	  (t (byte-compile-subr-wrong-args form "1-3")))))

Not sure how this would work. Don't you need to add the missing arguments?

Cleaned-up patch attached.
(Unless, of course, there is evidence that the byte op has never been emitted --- then we have an opportunity to drop it instead.)