diff options
author | Kenichi Handa <handa@gnu.org> | 2012-09-22 11:26:05 +0900 |
---|---|---|
committer | Kenichi Handa <handa@gnu.org> | 2012-09-22 11:26:05 +0900 |
commit | fa42927fd0ed023ec95a5475ce342429fd8a348d (patch) | |
tree | 5f37f88faa47b36dc85d19aedf89f483dc458358 /lisp/emacs-lisp/bytecomp.el | |
parent | 3cccbd87267735609a21df50b80b3aad07004555 (diff) | |
parent | 58f3a196fcd6c2f8b65e6b6cf1bc377d1a6287aa (diff) | |
download | emacs-fa42927fd0ed023ec95a5475ce342429fd8a348d.tar.gz emacs-fa42927fd0ed023ec95a5475ce342429fd8a348d.tar.bz2 emacs-fa42927fd0ed023ec95a5475ce342429fd8a348d.zip |
merge trunk
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index c42ae21aae5..7a229750178 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1115,18 +1115,12 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." "Warn that SYMBOL (a variable or function) is obsolete." (when (byte-compile-warning-enabled-p 'obsolete) (let* ((funcp (get symbol 'byte-obsolete-info)) - (obsolete (or funcp (get symbol 'byte-obsolete-variable))) - (instead (car obsolete)) - (asof (nth 2 obsolete))) + (msg (macroexp--obsolete-warning + symbol + (or funcp (get symbol 'byte-obsolete-variable)) + (if funcp "function" "variable")))) (unless (and funcp (memq symbol byte-compile-not-obsolete-funcs)) - (byte-compile-warn "`%s' is an obsolete %s%s%s" symbol - (if funcp "function" "variable") - (if asof (concat " (as of " asof ")") "") - (cond ((stringp instead) - (concat "; " instead)) - (instead - (format "; use `%s' instead." instead)) - (t "."))))))) + (byte-compile-warn "%s" msg))))) (defun byte-compile-report-error (error-info) "Report Lisp error in compilation. ERROR-INFO is the error data." |