diff options
| author | Nick Roberts | 2005-04-22 04:08:08 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-04-22 04:08:08 +0000 |
| commit | f7f8f37aa6dde60f6c43f58ec3226799ef1892a3 (patch) | |
| tree | 52396f8d4829cc3ca769b25a2486be9aded14069 | |
| parent | 727273e7e0a3b1cf8dce637d097416e4f1ba7e23 (diff) | |
| download | emacs-f7f8f37aa6dde60f6c43f58ec3226799ef1892a3.tar.gz emacs-f7f8f37aa6dde60f6c43f58ec3226799ef1892a3.zip | |
(define-obsolete-variable-alias): New macro.
| -rw-r--r-- | lisp/emacs-lisp/byte-run.el | 12 |
1 files changed, 12 insertions, 0 deletions
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." | |||
| 129 | (put variable 'byte-obsolete-variable (cons new when)) | 129 | (put variable 'byte-obsolete-variable (cons new when)) |
| 130 | variable) | 130 | variable) |
| 131 | 131 | ||
| 132 | (defmacro define-obsolete-variable-alias (variable new | ||
| 133 | &optional when docstring) | ||
| 134 | "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete. | ||
| 135 | If provided, WHEN should be a string indicating when VARIABLE was | ||
| 136 | first made obsolete, for example a date or a release number. The | ||
| 137 | optional argument DOCSTRING specifies the documentation string | ||
| 138 | for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the | ||
| 139 | documentation string of NEW unless it already has one." | ||
| 140 | `(progn | ||
| 141 | (defvaralias ,variable ,new ,docstring) | ||
| 142 | (make-obsolete-variable ,variable ,new ,when))) | ||
| 143 | |||
| 132 | (defmacro dont-compile (&rest body) | 144 | (defmacro dont-compile (&rest body) |
| 133 | "Like `progn', but the body always runs interpreted (not compiled). | 145 | "Like `progn', but the body always runs interpreted (not compiled). |
| 134 | If you think you need this, you're probably making a mistake somewhere." | 146 | If you think you need this, you're probably making a mistake somewhere." |