GNU bug report logs -
#62746
[PATCH] Updated Elispref-Manual: `nil' cannot be defuned
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62746 in the body.
You can then email your comments to 62746 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 08:39:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Shynur Xie <one.last.kiss <at> outlook.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 10 Apr 2023 08:39:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Original:
“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).”
________________________________________
By the way, I've sent a Copyright Assignment Request to
<assign <at> gnu.org> five days ago, but there is no reply. Is there any
additional information or action required from me?
> From: Eli Zaretskii
>
> Please email the following information to assign <at> gnu.org, and we
> will send you the assignment form for your past and future changes.
[0001-Updated-Elispref-Manual-nil-cannot-be-defuned.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 08:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 62746 <at> debbugs.gnu.org (full text, mbox):
> From: Shynur Xie <one.last.kiss <at> outlook.com>
> Date: Mon, 10 Apr 2023 08:33:20 +0000
>
> Original:
>
> “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?
> By the way, I've sent a Copyright Assignment Request to
> <assign <at> gnu.org> five days ago, but there is no reply. Is there any
> additional information or action required from me?
If they don't reply in a week from now, ping them and CC me.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 08:57:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 62746 <at> debbugs.gnu.org (full text, mbox):
I think what the manual says is: for example, if the value stored in the function cell of symbol `my-func` is `nil` or `void`, then defining `nil` or `void` with defun makes `my-func` a valid function.
________________________________________
From: Eli Zaretskii <eliz <at> gnu.org>
Sent: Monday, April 10, 2023 4:49 PM
To: Shynur Xie; Stefan Monnier
Cc: 62746 <at> debbugs.gnu.org
Subject: Re: bug#62746: [PATCH] Updated Elispref-Manual: `nil' cannot be defuned
> From: Shynur Xie <one.last.kiss <at> outlook.com>
> Date: Mon, 10 Apr 2023 08:33:20 +0000
>
> Original:
>
> “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?
> By the way, I've sent a Copyright Assignment Request to
> <assign <at> gnu.org> five days ago, but there is no reply. Is there any
> additional information or action required from me?
If they don't reply in a week from now, ping them and CC me.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 09:02:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 62746 <at> debbugs.gnu.org (full text, mbox):
> From: Shynur Xie <one.last.kiss <at> outlook.com>
> CC: "62746 <at> debbugs.gnu.org" <62746 <at> debbugs.gnu.org>
> Date: Mon, 10 Apr 2023 08:56:40 +0000
>
> I think what the manual says is: for example, if the value stored in the function cell of symbol `my-func` is `nil` or `void`, then defining `nil` or `void` with defun makes `my-func` a valid function.
And why is that wrong?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 09:12:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 62746 <at> debbugs.gnu.org (full text, mbox):
I tried to defun `nil', but Emacs gived me an error:
```
(defmacro defun (name arglist &optional docstring &rest body)
...
(or name (error "Cannot define '%s' as a function" name))
```
And sorry, I will attach the reason for my modification next time, instead of waiting for others to ask.
________________________________________
From: Eli Zaretskii <eliz <at> gnu.org>
Sent: Monday, April 10, 2023 5:01 PM
To: Shynur Xie
Cc: monnier <at> iro.umontreal.ca; 62746 <at> debbugs.gnu.org
Subject: Re: bug#62746: [PATCH] Updated Elispref-Manual: `nil' cannot be defuned
> From: Shynur Xie <one.last.kiss <at> outlook.com>
> CC: "62746 <at> debbugs.gnu.org" <62746 <at> debbugs.gnu.org>
> Date: Mon, 10 Apr 2023 08:56:40 +0000
>
> I think what the manual says is: for example, if the value stored in the function cell of symbol `my-func` is `nil` or `void`, then defining `nil` or `void` with defun makes `my-func` a valid function.
And why is that wrong?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Mon, 10 Apr 2023 14:16:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 62746 <at> debbugs.gnu.org (full text, mbox):
>> “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);
-- Stefan
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Fri, 05 May 2023 06:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Shynur Xie <one.last.kiss <at> outlook.com>
:
bug acknowledged by developer.
(Fri, 05 May 2023 06:38:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 62746-done <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Shynur Xie <one.last.kiss <at> outlook.com>, 62746 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Fri, 05 May 2023 14:02:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 62746-done <at> debbugs.gnu.org (full text, mbox):
>> >> “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.
The current text suggest that `nil` "can be valid [a]
function if you define [it] in turn with defun", which is not really true.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Fri, 05 May 2023 14:07:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 62746 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: one.last.kiss <at> outlook.com, 62746-done <at> debbugs.gnu.org
> Date: Fri, 05 May 2023 10:01:24 -0400
>
> > Thanks. So I think our documentation is correct in this aspect, and
> > I'm therefore closing this bug.
>
> The current text suggest that `nil` "can be valid [a]
> function if you define [it] in turn with defun", which is not really true.
Feel free to correct that, or suggest how to do that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Fri, 05 May 2023 18:05:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 62746 <at> debbugs.gnu.org (full text, mbox):
>> > Thanks. So I think our documentation is correct in this aspect, and
>> > I'm therefore closing this bug.
>>
>> The current text suggest that `nil` "can be valid [a]
>> function if you define [it] in turn with defun", which is not really true.
>
> Feel free to correct that, or suggest how to do that.
The suggest patch did just that, AFAICT.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#62746
; Package
emacs
.
(Sat, 06 May 2023 09:49:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 62746 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: one.last.kiss <at> outlook.com, 62746 <at> debbugs.gnu.org
> Date: Fri, 05 May 2023 14:04:26 -0400
>
> >> > Thanks. So I think our documentation is correct in this aspect, and
> >> > I'm therefore closing this bug.
> >>
> >> The current text suggest that `nil` "can be valid [a]
> >> function if you define [it] in turn with defun", which is not really true.
> >
> > Feel free to correct that, or suggest how to do that.
>
> The suggest patch did just that, AFAICT.
Ah, I've misunderstood what you said. Now fixed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 03 Jun 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 343 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.