From 6b4c17dec06b7cac4025317daef68c302c61d4e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 7 Oct 2022 11:43:19 +0200 Subject: [PATCH] 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. --- lisp/emacs-lisp/bytecomp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 03c45e44a56..74ba8984f29 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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) -- 2.39.5