From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 62746-done@debbugs.gnu.org, one.last.kiss@outlook.com
Subject: bug#62746: [PATCH] Updated Elispref-Manual: `nil' cannot be defuned
Date: Fri, 05 May 2023 09:38:03 +0300 [thread overview]
Message-ID: <834jorjnas.fsf@gnu.org> (raw)
In-Reply-To: <jwvpm8bhlmz.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Mon, 10 Apr 2023 10:14:59 -0400)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Shynur Xie <one.last.kiss@outlook.com>, 62746@debbugs.gnu.org
> Date: Mon, 10 Apr 2023 10:14:59 -0400
>
> >> “The symbols nil and void are Lisp objects, and can be stored into a
> >> function cell just as any other object can be (and they can be valid
> >> functions if you define them in turn with defun).”
> >>
> >> Updated:
> >>
> >> “The symbols nil and void are Lisp objects, and can be stored into a
> >> function cell just as any other object can be (and void can be a
> >> valid function if you define it with defun).”
> >
> > Why do you think the original text needs to be corrected?
>
> Indeed, `nil` is treated specially to mean "not defined" when we try to
> call a function:
>
> Lisp_Object
> funcall_general (Lisp_Object fun, ptrdiff_t numargs, Lisp_Object *args)
> {
> Lisp_Object original_fun = fun;
> retry:
> if (SYMBOLP (fun) && !NILP (fun)
> && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
> fun = indirect_function (fun);
>
> if (SUBRP (fun) && !SUBR_NATIVE_COMPILED_DYNP (fun))
> return funcall_subr (XSUBR (fun), numargs, args);
> else if (COMPILEDP (fun)
> || SUBR_NATIVE_COMPILED_DYNP (fun)
> || MODULE_FUNCTIONP (fun))
> return funcall_lambda (fun, numargs, args);
> else
> {
> if (NILP (fun))
> xsignal1 (Qvoid_function, original_fun);
>
Thanks. So I think our documentation is correct in this aspect, and
I'm therefore closing this bug.
next prev parent reply other threads:[~2023-05-05 6:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 8:33 bug#62746: [PATCH] Updated Elispref-Manual: `nil' cannot be defuned Shynur Xie
2023-04-10 8:50 ` Eli Zaretskii
2023-04-10 8:56 ` Shynur Xie
2023-04-10 9:02 ` Eli Zaretskii
2023-04-10 9:11 ` Shynur Xie
2023-04-10 14:14 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 6:38 ` Eli Zaretskii [this message]
2023-05-05 14:01 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 14:06 ` Eli Zaretskii
2023-05-05 18:04 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-06 9:49 ` Eli Zaretskii
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=834jorjnas.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=62746-done@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=one.last.kiss@outlook.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).