From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: How does letf work?
Date: Wed, 29 Jan 2014 01:35:47 +0100 [thread overview]
Message-ID: <87r47rpqtf.fsf@nl106-137-194.student.uu.se> (raw)
In-Reply-To: mailman.13065.1390951154.10748.help-gnu-emacs@gnu.org
Florian Beck <fb@miszellen.de> writes:
> The docstring of letf says: "This is the analogue of
> let', but with generalized variables (in the sense of
> setf') for the PLACEs."
(letf (((cdr test-x) '(a b c d)))
(message "%s" test-x) ; says '(KEY a b c d)
(cdr test-x) ) ; => (a b c d)
(And `... (nth 1 test-x)' => 'a, and so on.)
But:
(letf (((cdr test-x) '(a b c d)))
(message "%s" test-x) ; says '(KEY a b c d)
test-x) ; => '(KEY 1 2 3 4)
`letf' (or `cl-letf') resets the values when it exits:
> On exit, either normally or because of a `throw' or
> error, the PLACEs are set back to their original
> values.
So perhaps this inconsistency is due to the
implementation of that.
--
underground experts united:
http://user.it.uu.se/~embe8573
next parent reply other threads:[~2014-01-29 0:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.13065.1390951154.10748.help-gnu-emacs@gnu.org>
2014-01-29 0:35 ` Emanuel Berg [this message]
2014-01-28 23:10 How does letf work? Florian Beck
2014-01-29 2:23 ` Michael Heerdegen
[not found] ` <mailman.13075.1390962244.10748.help-gnu-emacs@gnu.org>
2014-01-29 8:37 ` Joost Kremers
2014-01-29 9:14 ` Joost Kremers
2014-01-29 15:29 ` Florian Beck
2014-01-29 16:12 ` Nicolas Richard
2014-01-29 20:19 ` Florian Beck
2014-01-29 15:06 ` Nicolas Richard
2014-01-29 23:46 ` Michael Heerdegen
2014-01-29 23:53 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r47rpqtf.fsf@nl106-137-194.student.uu.se \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.