
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn/warn-interactive-only\.el) (bytecomp-warn/warn-obsolete-defun\.el) (bytecomp-warn/warn-obsolete-hook\.el) (bytecomp-warn/warn-obsolete-variable-same-file\.el) (bytecomp-warn/warn-obsolete-variable\.el): New tests. * test/lisp/emacs-lisp/bytecomp-resources/warn-interactive-only.el: * test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-defun.el: * test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-hook.el: * test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-same-file.el: * test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable.el: New files.
13 lines
507 B
EmacsLisp
13 lines
507 B
EmacsLisp
;;; -*- lexical-binding: t -*-
|
|
|
|
(defvar foo-obsolete nil)
|
|
(make-obsolete-variable 'foo-obsolete nil "99.99")
|
|
|
|
;; From bytecomp.el:
|
|
;; If foo.el declares `toto' as obsolete, it is likely that foo.el will
|
|
;; actually use `toto' in order for this obsolete variable to still work
|
|
;; correctly, so paradoxically, while byte-compiling foo.el, the presence
|
|
;; of a make-obsolete-variable call for `toto' is an indication that `toto'
|
|
;; should not trigger obsolete-warnings in foo.el.
|
|
(defun foo ()
|
|
foo-obsolete)
|