From e34fd2f2c0b3730d521e99ae3bdf795c480376c4 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 12 Oct 2001 21:59:38 +0000 Subject: [PATCH] (byte-compile-check-lambda-list): Turn error for repeated variables into warning. --- lisp/ChangeLog | 7 +++++-- lisp/emacs-lisp/bytecomp.el | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0393faa8501..392f018207d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -112,8 +112,11 @@ 2001-10-12 Gerd Moellmann - * emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): - New function checking that lambda-list consists of non-constant + * emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): + Turn error for repeated variables into warning. + + * emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): New + function checking that lambda-list consists of non-constant symbols, that &rest and &optional are followed by variable names, that &rest VAR is the last element, and that variables aren't doubled. (byte-compile-lambda): Use it. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8813e3891b5..6e3b5b923b4 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -10,7 +10,7 @@ ;;; This version incorporates changes up to version 2.10 of the ;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.88.1.1 $") +(defconst byte-compile-version "$Revision: 2.89 $") ;; This file is part of GNU Emacs. @@ -2151,7 +2151,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." (unless (cdr list) (error "Variable name missing after &optional"))) ((memq arg vars) - (error "Repeated variable %s in lambda-list" arg)) + (byte-compile-warn "repeated variable %s in lambda-list" arg)) (t (push arg vars)))) (setq list (cdr list))))) -- 2.39.5