GNU bug report logs -
#21048
letrec is not documented in the manual
Previous Next
Reported by: Rustom Mody <rustompmody <at> gmail.com>
Date: Mon, 13 Jul 2015 16:00:06 UTC
Severity: minor
Tags: fixed
Found in version 24.4
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 21048 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Thanks, but I have trouble understanding what the text you wrote
> says. I think it needs clarifying, or maybe a descriptive enough
> example.
Yeah, it's pretty subtle what the difference is -- feel free to rewrite
to make it clearer.
I went through the tree looking for a real-life example of when this
macro is useful, and the first half-dozen examples I looked at could
have been written with let* instead and worked just as well, as far as I
can tell.
But I found one in elisp-mode.el and I adapted it slightly and added
this to the manual:
----
For instance, here's a closure that removes itself from a hook after
being run once:
@lisp
(letrec ((hookfun (lambda ()
(message "Run once")
(remove-hook 'post-command-hook hookfun))))
(add-hook 'post-command-hook hookfun))
@end lisp
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.