[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b6eccad: * lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _
From: |
Stefan Monnier |
Subject: |
master b6eccad: * lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args |
Date: |
Fri, 19 Feb 2021 12:51:42 -0500 (EST) |
branch: master
commit b6eccad06c89eea878c1464571255fe8ce5c6d86
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args
(byte-compile-check-lambda-list): Skip warnings of repeated arg for
those that are declared as unused anyway.
---
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 9d80afd..1b0906b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2859,7 +2859,9 @@ If FORM is a lambda or a macro, byte-compile it as a
function."
((eq arg '&optional)
(when (memq '&optional (cdr list))
(error "Duplicate &optional")))
- ((memq arg vars)
+ ((and (memq arg vars)
+ ;; Allow repetitions for unused args.
+ (not (string-match "\\`_" (symbol-name arg))))
(byte-compile-warn "repeated variable %s in lambda-list" arg))
(t
(push arg vars))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b6eccad: * lisp/emacs-lisp/bytecomp.el: Don't warn for repeated _ args,
Stefan Monnier <=