diff options
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/cl.texi | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index bf85b00e937..553b935b1ef 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -1299,17 +1299,18 @@ These forms make @code{let}-like bindings to functions instead | |||
| 1299 | of variables. | 1299 | of variables. |
| 1300 | 1300 | ||
| 1301 | @defmac cl-flet (bindings@dots{}) forms@dots{} | 1301 | @defmac cl-flet (bindings@dots{}) forms@dots{} |
| 1302 | This form establishes @code{let}-style bindings on the function | 1302 | This form establishes @code{let}-style bindings for functions rather |
| 1303 | cells of symbols rather than on the value cells. Each @var{binding} | 1303 | than values. Each @var{binding} must be a list of the form |
| 1304 | must be a list of the form @samp{(@var{name} @var{arglist} | 1304 | @samp{(@var{name} @var{arglist} @var{body}@dots{})}. Within |
| 1305 | @var{forms}@dots{})}, which defines a function exactly as if | 1305 | @var{forms}, any reference to the function @var{name} uses the local |
| 1306 | it were a @code{cl-defun} form. The function @var{name} is defined | 1306 | definition instead of the global one. |
| 1307 | accordingly but only within the body of the @code{cl-flet}, hiding any external | 1307 | |
| 1308 | definition if applicable. | 1308 | A ``reference'' to a function name is either a call to that function, |
| 1309 | or a use of its name quoted by @code{function} to be passed on to, | ||
| 1310 | say, @code{mapcar}. | ||
| 1309 | 1311 | ||
| 1310 | The bindings are lexical in scope. This means that all references to | 1312 | The bindings are lexical in scope. This means that all references to |
| 1311 | the named functions must appear physically within the body of the | 1313 | the named functions must appear physically within @var{forms}. |
| 1312 | @code{cl-flet} form. | ||
| 1313 | 1314 | ||
| 1314 | Functions defined by @code{cl-flet} may use the full Common Lisp | 1315 | Functions defined by @code{cl-flet} may use the full Common Lisp |
| 1315 | argument notation supported by @code{cl-defun}; also, the function | 1316 | argument notation supported by @code{cl-defun}; also, the function |
| @@ -1336,10 +1337,6 @@ functions must appear physically within the body of the | |||
| 1336 | the functions themselves. Thus, @code{cl-labels} can define | 1337 | the functions themselves. Thus, @code{cl-labels} can define |
| 1337 | local recursive functions, or mutually-recursive sets of functions. | 1338 | local recursive functions, or mutually-recursive sets of functions. |
| 1338 | 1339 | ||
| 1339 | A ``reference'' to a function name is either a call to that | ||
| 1340 | function, or a use of its name quoted by @code{quote} or | ||
| 1341 | @code{function} to be passed on to, say, @code{mapcar}. | ||
| 1342 | |||
| 1343 | Note that the @file{cl.el} version of this macro behaves slightly | 1340 | Note that the @file{cl.el} version of this macro behaves slightly |
| 1344 | differently. @xref{Obsolete Macros}. | 1341 | differently. @xref{Obsolete Macros}. |
| 1345 | @end defmac | 1342 | @end defmac |