aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2025-04-02 15:05:02 -0400
committerStefan Monnier2025-04-02 15:05:02 -0400
commit7cffcbb5137666f1c544e7b0c1a544e2bc660ddd (patch)
tree7b60a506778c37fcd118dfa4eff899159a3a1af4
parentdf82855aeb0038c810a451272eb34ae88984e8f6 (diff)
downloademacs-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.el16
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."
2072Each definition can take the form (FUNC EXP) where FUNC is the function 2072Each definition can take the form (FUNC EXP) where FUNC is the function
2073name, and EXP is an expression that returns the function value to which 2073name, and EXP is an expression that returns the function value to which
2074it should be bound, or it can take the more common form (FUNC ARGLIST 2074it should be bound, or it can take the more common form (FUNC ARGLIST
2075BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)). 2075BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY))
2076where BODY is wrapped in a `cl-block' named FUNC.
2076 2077
2077FUNC is defined only within FORM, not BODY, so you can't write recursive 2078FUNC is defined only within FORM, not BODY, so you can't write recursive
2078function definitions. Use `cl-labels' for that. See Info node 2079function definitions. Use `cl-labels' for that. See Info node
@@ -2279,11 +2280,14 @@ Like `cl-flet' but the definitions can refer to previous ones.
2279Each definition can take the form (FUNC EXP) where FUNC is the function 2280Each definition can take the form (FUNC EXP) where FUNC is the function
2280name, and EXP is an expression that returns the function value to which 2281name, and EXP is an expression that returns the function value to which
2281it should be bound, or it can take the more common form (FUNC ARGLIST 2282it should be bound, or it can take the more common form (FUNC ARGLIST
2282BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY)). 2283BODY...) which is a shorthand for (FUNC (lambda ARGLIST BODY))
2283 2284where BODY is wrapped in a `cl-block' named FUNC.
2284FUNC is defined in any BODY, as well as FORM, so you can write recursive 2285
2285and mutually recursive function definitions. See Info node 2286FUNC is in scope in any BODY or EXP, as well as in FORM, so you can write
2286`(cl) Function Bindings' for details. 2287recursive and mutually recursive function definitions, with the caveat
2288that EXPs are evaluated in sequence and you cannot call a FUNC before its
2289EXP has been evaluated.
2290See 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))