From f7f8f37aa6dde60f6c43f58ec3226799ef1892a3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 22 Apr 2005 04:08:08 +0000 Subject: [PATCH] (define-obsolete-variable-alias): New macro. --- lisp/emacs-lisp/byte-run.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 60fc862676d..ab7259b667f 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -129,6 +129,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." -- 2.39.2