[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b4c17dec0 1/2: Clearer byte-compiler arity warnings (bug#58319)
From: |
Mattias Engdegård |
Subject: |
master 6b4c17dec0 1/2: Clearer byte-compiler arity warnings (bug#58319) |
Date: |
Fri, 7 Oct 2022 07:59:51 -0400 (EDT) |
branch: master
commit 6b4c17dec06b7cac4025317daef68c302c61d4e6
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
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 03c45e44a5..74ba8984f2 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)