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.
This commit is contained in:
parent
ba011e487d
commit
96bbbaec5c
4 changed files with 17 additions and 5 deletions
|
@ -3441,10 +3441,11 @@ for symbols generated by the byte compiler itself."
|
|||
(and od
|
||||
(not (memq var byte-compile-not-obsolete-vars))
|
||||
(not (memq var byte-compile-global-not-obsolete-vars))
|
||||
(or (pcase (nth 1 od)
|
||||
('set (not (eq access-type 'reference)))
|
||||
('get (eq access-type 'reference))
|
||||
(_ t)))))
|
||||
(not (memq var byte-compile-lexical-variables))
|
||||
(pcase (nth 1 od)
|
||||
('set (not (eq access-type 'reference)))
|
||||
('get (eq access-type 'reference))
|
||||
(_ t))))
|
||||
(byte-compile-warn-obsolete var))))
|
||||
|
||||
(defsubst byte-compile-dynamic-variable-op (base-op var)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue