diff options
author | Michael Heerdegen <michael_heerdegen@web.de> | 2020-12-22 05:44:47 +0100 |
---|---|---|
committer | Michael Heerdegen <michael_heerdegen@web.de> | 2021-01-06 10:51:28 +0100 |
commit | 96bbbaec5c1b2612946ff08abf9d43e7478e8c43 (patch) | |
tree | 95d9e25909bc926b1cbe911d604393d88142d73b /test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el | |
parent | ba011e487d40b96691d3e7af917ff6ce9d7c7a00 (diff) | |
download | emacs-96bbbaec5c1b2612946ff08abf9d43e7478e8c43.tar.gz emacs-96bbbaec5c1b2612946ff08abf9d43e7478e8c43.tar.bz2 emacs-96bbbaec5c1b2612946ff08abf9d43e7478e8c43.zip |
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.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-bound.el | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |