summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-run.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-05-05 00:04:55 +0000
committerMiles Bader <miles@gnu.org>2005-05-05 00:04:55 +0000
commitcca4e3b099ec4c3f4a36fd0cb865c618a5589069 (patch)
tree711e73e53dbe1ab3a59b53fb56a10836e777b43e /lisp/emacs-lisp/byte-run.el
parentd469f5c370dbb6fac0e8d6687b47ccfcf96a13a5 (diff)
parentd68a5392cafedbe0ee6c3eca0444fce4a58b6cdf (diff)
downloademacs-cca4e3b099ec4c3f4a36fd0cb865c618a5589069.tar.gz
emacs-cca4e3b099ec4c3f4a36fd0cb865c618a5589069.tar.bz2
emacs-cca4e3b099ec4c3f4a36fd0cb865c618a5589069.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-44
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 272-288) - src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field. - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 67) - Update from CVS
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r--lisp/emacs-lisp/byte-run.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 60fc862676d..5c92f247a05 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -114,6 +114,18 @@ was first made obsolete, for example a date or a release number."
(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.
@@ -129,6 +141,18 @@ was first made obsolete, for example a date or a release number."
(put variable 'byte-obsolete-variable (cons new when))
variable)
+(defmacro define-obsolete-variable-alias (variable new
+ &optional when docstring)
+ "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete.
+If provided, WHEN should be a string indicating when VARIABLE was
+first made obsolete, for example a date or a release number. The
+optional argument DOCSTRING specifies the documentation string
+for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the
+documentation string of NEW unless it already has one."
+ `(progn
+ (defvaralias ,variable ,new ,docstring)
+ (make-obsolete-variable ,variable ,new ,when)))
+
(defmacro dont-compile (&rest body)
"Like `progn', but the body always runs interpreted (not compiled).
If you think you need this, you're probably making a mistake somewhere."