diff options
| author | Juanma Barranquero | 2008-03-26 12:18:17 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-03-26 12:18:17 +0000 |
| commit | d87e5a256572107ff4a1069b9ad48368efb09738 (patch) | |
| tree | 178a099ee4731aec1b869c1487a659044e7b34a3 | |
| parent | 31d24a4b3a67397f53a4a1fb734350d44ae1e589 (diff) | |
| download | emacs-d87e5a256572107ff4a1069b9ad48368efb09738.tar.gz emacs-d87e5a256572107ff4a1069b9ad48368efb09738.zip | |
(byte-compile-obsolete): If no replacement is provided,
don't print "use nil instead".
| -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'." | |||
| 1119 | ;;; Used by make-obsolete. | 1119 | ;;; Used by make-obsolete. |
| 1120 | (defun byte-compile-obsolete (form) | 1120 | (defun byte-compile-obsolete (form) |
| 1121 | (let* ((new (get (car form) 'byte-obsolete-info)) | 1121 | (let* ((new (get (car form) 'byte-obsolete-info)) |
| 1122 | (use (car new)) | ||
| 1122 | (handler (nth 1 new)) | 1123 | (handler (nth 1 new)) |
| 1123 | (when (nth 2 new))) | 1124 | (when (nth 2 new))) |
| 1124 | (byte-compile-set-symbol-position (car form)) | 1125 | (byte-compile-set-symbol-position (car form)) |
| 1125 | (if (byte-compile-warning-enabled-p 'obsolete) | 1126 | (if (byte-compile-warning-enabled-p 'obsolete) |
| 1126 | (byte-compile-warn "`%s' is an obsolete function%s; %s" (car form) | 1127 | (byte-compile-warn "`%s' is an obsolete function%s%s" (car form) |
| 1127 | (if when (concat " (as of Emacs " when ")") "") | 1128 | (if when (concat " (as of Emacs " when ")") "") |
| 1128 | (if (stringp (car new)) | 1129 | (cond ((stringp use) |
| 1129 | (car new) | 1130 | (concat "; " use)) |
| 1130 | (format "use `%s' instead." (car new))))) | 1131 | (use (format "; use `%s' instead." use)) |
| 1132 | (t ".")))) | ||
| 1131 | (funcall (or handler 'byte-compile-normal-call) form))) | 1133 | (funcall (or handler 'byte-compile-normal-call) form))) |
| 1132 | 1134 | ||
| 1133 | ;; Compiler options | 1135 | ;; Compiler options |