diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-10-07 11:43:19 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-10-07 13:57:54 +0200 |
commit | 6b4c17dec06b7cac4025317daef68c302c61d4e6 (patch) | |
tree | 79ee1a4cf53d24a4e96894f852d11e35e4b94874 /lisp/emacs-lisp/bytecomp.el | |
parent | e84b732cbc54d5ba66e0b6f824edccb2bcb18668 (diff) | |
download | emacs-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.el | 4 |
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) |