From 96bbbaec5c1b2612946ff08abf9d43e7478e8c43 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Tue, 22 Dec 2020 05:44:47 +0100 Subject: Fix obsolete variable warnings about class names * lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload): Try to make the wording of the warning about the obsoleted variable less confusing. * lisp/emacs-lisp/bytecomp.el (byte-compile-check-variable): Don't warn for lexical variables (Bug#39169). Fix spurious `or'. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp/warn-obsolete-variable-bound\.el): New test. * test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el: New file. --- .../emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el') diff --git a/test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el b/test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el new file mode 100644 index 00000000000..e65a541e6e3 --- /dev/null +++ b/test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el @@ -0,0 +1,7 @@ +;;; -*- lexical-binding: t -*- + +(make-obsolete-variable 'bytecomp--tests-obsolete-var-2 nil "99.99") + +(defun foo () + (let ((bytecomp--tests-obsolete-var-2 2)) + bytecomp--tests-obsolete-var-2)) -- cgit v1.2.3