diff options
| author | Lars Ingebrigtsen | 2019-06-17 12:09:18 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-17 12:09:18 +0200 |
| commit | 3ccc0d623a44af8238ffa5d97e6976395e47fc9a (patch) | |
| tree | b17941ec0997fa07a4c716ca009e45890526c46e | |
| parent | 3820b77c9e32fa157803cb004d308163c7b7e33e (diff) | |
| download | emacs-3ccc0d623a44af8238ffa5d97e6976395e47fc9a.tar.gz emacs-3ccc0d623a44af8238ffa5d97e6976395e47fc9a.zip | |
Add check for enabled warning before issuing
* lisp/emacs-lisp/bytecomp.el (byte-compile-function-warn): Check
whether we want the `obsolete' warning before issuing it.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 66dfe4302f4..9e3e603c043 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1397,7 +1397,8 @@ when printing the error message." | |||
| 1397 | 1397 | ||
| 1398 | (defun byte-compile-function-warn (f nargs def) | 1398 | (defun byte-compile-function-warn (f nargs def) |
| 1399 | (byte-compile-set-symbol-position f) | 1399 | (byte-compile-set-symbol-position f) |
| 1400 | (when (get f 'byte-obsolete-info) | 1400 | (when (and (get f 'byte-obsolete-info) |
| 1401 | (byte-compile-warning-enabled-p 'obsolete f)) | ||
| 1401 | (byte-compile-warn-obsolete f)) | 1402 | (byte-compile-warn-obsolete f)) |
| 1402 | 1403 | ||
| 1403 | ;; Check to see if the function will be available at runtime | 1404 | ;; Check to see if the function will be available at runtime |