diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2008-03-26 12:18:17 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2008-03-26 12:18:17 +0000 |
commit | d87e5a256572107ff4a1069b9ad48368efb09738 (patch) | |
tree | 178a099ee4731aec1b869c1487a659044e7b34a3 /lisp/emacs-lisp | |
parent | 31d24a4b3a67397f53a4a1fb734350d44ae1e589 (diff) | |
download | emacs-d87e5a256572107ff4a1069b9ad48368efb09738.tar.gz emacs-d87e5a256572107ff4a1069b9ad48368efb09738.tar.bz2 emacs-d87e5a256572107ff4a1069b9ad48368efb09738.zip |
(byte-compile-obsolete): If no replacement is provided,
don't print "use nil instead".
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e62968a392d..2aeefc38e8c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1119,15 +1119,17 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." ;;; Used by make-obsolete. (defun byte-compile-obsolete (form) (let* ((new (get (car form) 'byte-obsolete-info)) + (use (car new)) (handler (nth 1 new)) (when (nth 2 new))) (byte-compile-set-symbol-position (car form)) (if (byte-compile-warning-enabled-p 'obsolete) - (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) + (byte-compile-warn "`%s' is an obsolete function%s%s" (car form) (if when (concat " (as of Emacs " when ")") "") - (if (stringp (car new)) - (car new) - (format "use `%s' instead." (car new))))) + (cond ((stringp use) + (concat "; " use)) + (use (format "; use `%s' instead." use)) + (t ".")))) (funcall (or handler 'byte-compile-normal-call) form))) ;; Compiler options |