# HG changeset patch # User Nick Roberts # Date 1114142888 0 # Node ID d4e4e1694bf8cda4412dbb0c4031364864e81ea7 # Parent bd6904d996299f635d533a3b34d41f773d6646fc (define-obsolete-variable-alias): New macro. diff -r bd6904d99629 -r d4e4e1694bf8 lisp/emacs-lisp/byte-run.el --- a/lisp/emacs-lisp/byte-run.el Fri Apr 22 04:07:29 2005 +0000 +++ b/lisp/emacs-lisp/byte-run.el Fri Apr 22 04:08:08 2005 +0000 @@ -129,6 +129,18 @@ (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."