From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62746: [PATCH] Updated Elispref-Manual: `nil' cannot be defuned Date: Mon, 10 Apr 2023 10:14:59 -0400 Message-ID: References: <83y1n0azp3.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34204"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62746@debbugs.gnu.org, Shynur Xie To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 10 16:16:17 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plsJc-0008id-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Apr 2023 16:16:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plsJS-0005Fn-Af; Mon, 10 Apr 2023 10:16:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1plsJO-0004zx-Vq for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 10:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plsJO-00010e-Kn for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 10:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1plsJN-00036r-W7 for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2023 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Apr 2023 14:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62746-submit@debbugs.gnu.org id=B62746.168113611011892 (code B ref 62746); Mon, 10 Apr 2023 14:16:01 +0000 Original-Received: (at 62746) by debbugs.gnu.org; 10 Apr 2023 14:15:10 +0000 Original-Received: from localhost ([127.0.0.1]:35556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plsIY-00035i-GZ for submit@debbugs.gnu.org; Mon, 10 Apr 2023 10:15:10 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plsIW-00035S-LZ for 62746@debbugs.gnu.org; Mon, 10 Apr 2023 10:15:09 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 000EF80899; Mon, 10 Apr 2023 10:15:02 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B8F5D80073; Mon, 10 Apr 2023 10:15:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1681136101; bh=4Cv+UZTkysjMI3zkH+xL5BJtbC/c9Es+77no2StYQ3I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=T0dMhng2VtDISZpbDnXMRSecQZ6TiH02+2VKj9vurhcasLJSh9DhP0he6fKAWYDGP JoPu2h88NM2P9z+cBX5X3OWnGvwQj5veU4tYE0rR9ChxdsmtTf4K0AiCvLmDwMsG1u f/0/Rh/Rrn0gD6M9yLI7bYS9As5TwBIbY9A1G+7hcmyzwjIhONBocelvL352Y8uoeE qCFDVkbqbzdxK+eWrPXN5bGmiqYDH5sYHtZOzxzPBmjgvsfeRseAmj2+Tz4zwjL9FY Ra5lGuReuwHXIUNPkH0epWEtX9xq7g/SOrMSfowVnsZmf32Szk93AEVBEmQVkhXps2 ceUBYtNdX5LCw== Original-Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 911521232FD; Mon, 10 Apr 2023 10:15:01 -0400 (EDT) In-Reply-To: <83y1n0azp3.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Apr 2023 11:50:16 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259579 Archived-At: >> =E2=80=9CThe symbols nil and void are Lisp objects, and can be stored in= to a >> function cell just as any other object can be (and they can be valid >> functions if you define them in turn with defun).=E2=80=9D >>=20 >> Updated: >>=20 >> =E2=80=9CThe symbols nil and void are Lisp objects, and can be stored in= to a >> function cell just as any other object can be (and void can be a >> valid function if you define it with defun).=E2=80=9D > > 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 =3D fun; retry: if (SYMBOLP (fun) && !NILP (fun) && (fun =3D XSYMBOL (fun)->u.s.function, SYMBOLP (fun))) fun =3D indirect_function (fun); =20=20=20=20 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); -- Stefan