diff options
| author | Stefan Monnier | 2025-04-02 15:05:02 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2025-04-02 15:05:02 -0400 |
| commit | 7cffcbb5137666f1c544e7b0c1a544e2bc660ddd (patch) | |
| tree | 7b60a506778c37fcd118dfa4eff899159a3a1af4 | |
| parent | df82855aeb0038c810a451272eb34ae88984e8f6 (diff) | |
| download | emacs-7cffcbb5137666f1c544e7b0c1a544e2bc660ddd.tar.gz emacs-7cffcbb5137666f1c544e7b0c1a544e2bc660ddd.zip | |
cl-macs.el: Fix minor merge snafu (bug#77348)
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Recover the changes
made in commit 476426168106 and accidentally undone by a later merge of
commit 63adf9dcf53a.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index cc1c6a6a5ad..a966ec5eaf6 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2072,7 +2072,8 @@ a `let' form, except that the list of symbols can be computed at run-time." | |||
| 2072 | Each definition can take the form (FUNC EXP) where FUNC is the function | 2072 | Each definition can take the form (FUNC EXP) where FUNC is the function |
| 2073 | name, and EXP is an expression that returns the function value to which | 2073 | name, and EXP is an expression that returns the function value to which |
| 2074 | it should be bound, or it can take the more common form (FUNC ARGLIST | 2074 | it should be bound, or it can take the more common form (FUNC ARGLIST |
| 2075 | BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)). | 2075 | BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)) |
| 2076 | where BODY is wrapped in a `cl-block' named FUNC. | ||
| 2076 | 2077 | ||
| 2077 | FUNC is defined only within FORM, not BODY, so you can't write recursive | 2078 | FUNC is defined only within FORM, not BODY, so you can't write recursive |
| 2078 | function definitions. Use `cl-labels' for that. See Info node | 2079 | function definitions. Use `cl-labels' for that. See Info node |
| @@ -2279,11 +2280,14 @@ Like `cl-flet' but the definitions can refer to previous ones. | |||
| 2279 | Each definition can take the form (FUNC EXP) where FUNC is the function | 2280 | Each definition can take the form (FUNC EXP) where FUNC is the function |
| 2280 | name, and EXP is an expression that returns the function value to which | 2281 | name, and EXP is an expression that returns the function value to which |
| 2281 | it should be bound, or it can take the more common form (FUNC ARGLIST | 2282 | it should be bound, or it can take the more common form (FUNC ARGLIST |
| 2282 | BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)). | 2283 | BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)) |
| 2283 | 2284 | where BODY is wrapped in a `cl-block' named FUNC. | |
| 2284 | FUNC is defined in any BODY, as well as FORM, so you can write recursive | 2285 | |
| 2285 | and mutually recursive function definitions. See Info node | 2286 | FUNC is in scope in any BODY or EXP, as well as in FORM, so you can write |
| 2286 | `(cl) Function Bindings' for details. | 2287 | recursive and mutually recursive function definitions, with the caveat |
| 2288 | that EXPs are evaluated in sequence and you cannot call a FUNC before its | ||
| 2289 | EXP has been evaluated. | ||
| 2290 | See Info node `(cl) Function Bindings' for details. | ||
| 2287 | 2291 | ||
| 2288 | \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" | 2292 | \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" |
| 2289 | (declare (indent 1) (debug cl-flet)) | 2293 | (declare (indent 1) (debug cl-flet)) |