summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-10-07 11:43:19 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-10-07 13:57:54 +0200
commit6b4c17dec06b7cac4025317daef68c302c61d4e6 (patch)
tree79ee1a4cf53d24a4e96894f852d11e35e4b94874 /lisp/emacs-lisp/bytecomp.el
parente84b732cbc54d5ba66e0b6f824edccb2bcb18668 (diff)
downloademacs-6b4c17dec06b7cac4025317daef68c302c61d4e6.tar.gz
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.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
1 files changed, 3 insertions, 1 deletions
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)