diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-19 12:51:36 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-02-19 12:51:36 -0500 |
commit | b6eccad06c89eea878c1464571255fe8ce5c6d86 (patch) | |
tree | 1c960bdea541c7c3cc5ca3e2ba30f0d249248217 /lisp/emacs-lisp | |
parent | 9b7eed33f94a65c4a9d1353aa052114415fc6381 (diff) | |
download | emacs-b6eccad06c89eea878c1464571255fe8ce5c6d86.tar.gz emacs-b6eccad06c89eea878c1464571255fe8ce5c6d86.tar.bz2 emacs-b6eccad06c89eea878c1464571255fe8ce5c6d86.zip |
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-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 9d80afd774f..1b0906b50bb 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)))) |