Mercurial > emacs
comparison lispref/functions.texi @ 90196:82d495f87e7b
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-64
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 424)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 15 Jun 2005 23:37:29 +0000 |
parents | 62afea0771d8 f0e4b6c7de96 |
children | b7da78284d4c |
comparison
equal
deleted
inserted
replaced
90195:a1b34dec1104 | 90196:82d495f87e7b |
---|---|
1155 @section Declaring Functions Obsolete | 1155 @section Declaring Functions Obsolete |
1156 | 1156 |
1157 You can use @code{make-obsolete} to declare a function obsolete. This | 1157 You can use @code{make-obsolete} to declare a function obsolete. This |
1158 indicates that the function may be removed at some stage in the future. | 1158 indicates that the function may be removed at some stage in the future. |
1159 | 1159 |
1160 @defun make-obsolete function new &optional when | 1160 @defun make-obsolete obsolete-name current-name &optional when |
1161 This function makes the byte compiler warn that the function | 1161 This function makes the byte compiler warn that the function |
1162 @var{function} is obsolete. If @var{new} is a symbol, the warning | 1162 @var{obsolete-name} is obsolete. If @var{current-name} is a symbol, the |
1163 message says to use @var{new} instead of @var{function}. @var{new} | 1163 warning message says to use @var{current-name} instead of |
1164 does not need to be an alias for @var{function}; it can be a different | 1164 @var{obsolete-name}. @var{current-name} does not need to be an alias for |
1165 function with similar functionality. If @var{new} is a string, it is | 1165 @var{obsolete-name}; it can be a different function with similar |
1166 the warning message. | 1166 functionality. If @var{current-name} is a string, it is the warning |
1167 message. | |
1167 | 1168 |
1168 If provided, @var{when} should be a string indicating when the function | 1169 If provided, @var{when} should be a string indicating when the function |
1169 was first made obsolete---for example, a date or a release number. | 1170 was first made obsolete---for example, a date or a release number. |
1170 @end defun | 1171 @end defun |
1171 | 1172 |
1172 You can define a function as an alias and declare it obsolete at the | 1173 You can define a function as an alias and declare it obsolete at the |
1173 same time using the macro @code{define-obsolete-function-alias}. | 1174 same time using the macro @code{define-obsolete-function-alias}. |
1174 | 1175 |
1175 @defmac define-obsolete-function-alias function new &optional when docstring | 1176 @defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring |
1176 This macro marks the function @var{function} obsolete and also defines | 1177 This macro marks the function @var{obsolete-name} obsolete and also defines |
1177 it as an alias for the function @var{new}. A typical call has the form: | 1178 it as an alias for the function @var{current-name}. A typical call has the |
1179 form: | |
1178 | 1180 |
1179 @example | 1181 @example |
1180 (define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.") | 1182 (define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.") |
1181 @end example | 1183 @end example |
1182 | 1184 |