[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-run.el |
Date: |
Tue, 26 Apr 2005 05:03:56 -0400 |
Index: emacs/lisp/emacs-lisp/byte-run.el
diff -c emacs/lisp/emacs-lisp/byte-run.el:1.9
emacs/lisp/emacs-lisp/byte-run.el:1.10
*** emacs/lisp/emacs-lisp/byte-run.el:1.9 Fri Apr 22 04:08:08 2005
--- emacs/lisp/emacs-lisp/byte-run.el Tue Apr 26 09:03:56 2005
***************
*** 114,119 ****
--- 114,131 ----
(put function 'byte-obsolete-info (list new handler when)))
function)
+ (defmacro define-obsolete-function-alias (function new
+ &optional when docstring)
+ "Set FUNCTION's function definition to NEW and warn that FUNCTION is
obsolete.
+ If provided, WHEN should be a string indicating when FUNCTION was
+ first made obsolete, for example a date or a release number. The
+ optional argument DOCSTRING specifies the documentation string
+ for FUNCTION; if DOCSTRING is omitted or nil, FUNCTION uses the
+ documentation string of NEW unluess it already has one."
+ `(progn
+ (defalias ,function ,new ,docstring)
+ (make-obsolete ,function ,new ,when)))
+
(defun make-obsolete-variable (variable new &optional when)
"Make the byte-compiler warn that VARIABLE is obsolete.
The warning will say that NEW should be used instead.