diff options
| author | Stefan Monnier | 2011-03-11 21:59:24 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-11 21:59:24 -0500 |
| commit | 3aaaa6f1c9ebd44db3a293e6fd4c08193caf2275 (patch) | |
| tree | 80ed0e1d0df3e4751b21694bead90cf75fca744f | |
| parent | 7f0869bd1d2f8681f86b0104dff1392d29634d0e (diff) | |
| download | emacs-3aaaa6f1c9ebd44db3a293e6fd4c08193caf2275.tar.gz emacs-3aaaa6f1c9ebd44db3a293e6fd4c08193caf2275.zip | |
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable):
Disable obsolescence warnings in the file that declares it.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9456644a7a8..087c5b0acbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable): | ||
| 4 | Disable obsolescence warnings in the file that declares it. | ||
| 5 | |||
| 1 | 2011-03-11 Ken Manheimer <ken.manheimer@gmail.com> | 6 | 2011-03-11 Ken Manheimer <ken.manheimer@gmail.com> |
| 2 | 7 | ||
| 3 | * allout-widgets.el (allout-widgets-tally) Initialize | 8 | * allout-widgets.el (allout-widgets-tally) Initialize |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2f113dfb479..5e24b80ac5a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3840,6 +3840,17 @@ that suppresses all warnings during execution of BODY." | |||
| 3840 | ,@decls | 3840 | ,@decls |
| 3841 | ',(nth 1 form))))) | 3841 | ',(nth 1 form))))) |
| 3842 | 3842 | ||
| 3843 | ;; If foo.el declares `toto' as obsolete, it is likely that foo.el will | ||
| 3844 | ;; actually use `toto' in order for this obsolete variable to still work | ||
| 3845 | ;; correctly, so paradoxically, while byte-compiling foo.el, the presence | ||
| 3846 | ;; of a make-obsolete-variable call for `toto' is an indication that `toto' | ||
| 3847 | ;; should not trigger obsolete-warnings in foo.el. | ||
| 3848 | (byte-defop-compiler-1 make-obsolete-variable) | ||
| 3849 | (defun byte-compile-make-obsolete-variable (form) | ||
| 3850 | (when (eq 'quote (car-safe (nth 1 form))) | ||
| 3851 | (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars)) | ||
| 3852 | (byte-compile-normal-call form)) | ||
| 3853 | |||
| 3843 | (defun byte-compile-defvar (form) | 3854 | (defun byte-compile-defvar (form) |
| 3844 | ;; This is not used for file-level defvar/consts with doc strings. | 3855 | ;; This is not used for file-level defvar/consts with doc strings. |
| 3845 | (when (and (symbolp (nth 1 form)) | 3856 | (when (and (symbolp (nth 1 form)) |