diff options
| -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 |