From: LdBeth <andpuke@foxmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: LdBeth <andpuke@foxmail.com>, Tomas Hlavaty <tom@logand.com>,
emacs-devel@gnu.org
Subject: Re: using finalizers
Date: Fri, 31 Dec 2021 12:43:06 +0800 [thread overview]
Message-ID: <tencent_EE0CBAFD1CE97A9A301E74BCAC92FE9CDC09@qq.com> (raw)
In-Reply-To: <tencent_4CC28DA9FBCB31B64701835E87D4CAFF4F05@qq.com>
>>>>> In <tencent_4CC28DA9FBCB31B64701835E87D4CAFF4F05@qq.com>
>>>>> LdBeth <andpuke@foxmail.com> wrote:
>>>>> In <jwv35m94fqf.fsf-monnier+emacs@gnu.org>
>>>>> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
ldb> There's nothing wrong with the behavior of `make-finalizer`, it just
ldb> treats a symbol as a function specifier, just like elisp does not
ldb> doing anything to prevent a user from `fset' symbol `nil' and
ldb> `(funcall nil)'.
Allow me to make a correction: Emacs 27 would report a error when
`(fset nil (lambda () 1))', but some Common Lisps would allow that,
and `(fset t (lambda () 1))' works in Elisp.
I guess it's because of the difference in some implementation details.
While `(symbolp nil) => t', `nil' is actually a constant stands for
"empty list" that doesn't have the corresponding definition slots.
But still, I think the behavior of `make-finalizer' doesn't need a fix.
--
LDB
next prev parent reply other threads:[~2021-12-31 4:43 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 22:43 using finalizers Tomas Hlavaty
2021-12-31 2:46 ` LdBeth
2021-12-31 3:29 ` Stefan Monnier
2021-12-31 3:36 ` Stefan Monnier
2021-12-31 4:30 ` LdBeth
2021-12-31 4:43 ` LdBeth [this message]
2021-12-31 6:28 ` Tomas Hlavaty
2021-12-31 10:59 ` LdBeth
2021-12-31 11:18 ` Tomas Hlavaty
2021-12-31 11:41 ` LdBeth
2021-12-31 12:01 ` Tomas Hlavaty
2022-01-01 17:00 ` Stefan Monnier
2022-01-01 20:25 ` Tomas Hlavaty
2022-01-01 20:47 ` Stefan Monnier
2022-01-01 22:55 ` Tomas Hlavaty
2022-01-01 23:18 ` Stefan Monnier
2022-01-01 23:47 ` Tomas Hlavaty
2022-01-01 23:26 ` Tomas Hlavaty
2021-12-31 7:50 ` Eli Zaretskii
2021-12-31 9:31 ` Tomas Hlavaty
2021-12-31 12:27 ` Eli Zaretskii
2022-01-01 17:58 ` Tomas Hlavaty
2022-01-01 18:20 ` Eli Zaretskii
2022-01-01 20:55 ` Stefan Monnier
2022-01-01 23:05 ` Tomas Hlavaty
2022-01-01 23:21 ` Stefan Monnier
2021-12-31 14:23 ` Rudolf Schlatte
2021-12-31 16:21 ` Stefan Monnier
2022-01-01 17:37 ` Tomas Hlavaty
2022-01-01 22:36 ` Tomas Hlavaty
2022-01-02 6:54 ` Eli Zaretskii
2022-01-02 7:53 ` Tomas Hlavaty
2022-01-02 8:33 ` Eli Zaretskii
2022-01-02 13:10 ` Tomas Hlavaty
2022-01-02 14:42 ` Eli Zaretskii
2022-01-02 15:16 ` Eli Zaretskii
2022-01-02 17:18 ` Tomas Hlavaty
2022-01-02 18:11 ` Rudolf Schlatte
2022-01-03 0:37 ` Tomas Hlavaty
2022-01-04 3:08 ` Richard Stallman
2021-12-31 14:39 ` LdBeth
2022-01-01 17:59 ` Tomas Hlavaty
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_EE0CBAFD1CE97A9A301E74BCAC92FE9CDC09@qq.com \
--to=andpuke@foxmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tom@logand.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).