Clearer byte-compiler arity warnings (bug#58319)

* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature-string):
Replace '3+' and '3-4' with '3 or more' and '3 or 4', respectively.
This commit is contained in:
Mattias Engdegård 2022-10-07 11:43:19 +02:00
parent e84b732cbc
commit 6b4c17dec0

View file

@ -1469,9 +1469,11 @@ when printing the error message."
(defun byte-compile-arglist-signature-string (signature)
(cond ((null (cdr signature))
(format "%d+" (car signature)))
(format "%d or more" (car signature)))
((= (car signature) (cdr signature))
(format "%d" (car signature)))
((= (1+ (car signature)) (cdr signature))
(format "%d or %d" (car signature) (cdr signature)))
(t (format "%d-%d" (car signature) (cdr signature)))))
(defun byte-compile-function-warn (f nargs def)