GNU bug report logs - #32284
special form documentation

Previous Next

Package: emacs;

Reported by: Nicholas Drozd <nicholasdrozd <at> gmail.com>

Date: Thu, 26 Jul 2018 23:35:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32284 in the body.
You can then email your comments to 32284 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32284; Package emacs. (Thu, 26 Jul 2018 23:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicholas Drozd <nicholasdrozd <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Jul 2018 23:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicholas Drozd <nicholasdrozd <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: special form documentation
Date: Thu, 26 Jul 2018 17:44:17 -0500
[Message part 1 (text/plain, inline)]
The Elisp manual section on Special Forms (10.2.7) lists around two dozen
special forms, but two of them aren't special forms.

* `lambda', it turns out, is not a special form, but a macro that wraps
itself in a call to the special form `function'. (The documentation for
`lambda' refers to it as "self-quoting"; this might be better changed to
"self-evaluating".)

* `track-mouse' isn't a special form, but a macro wrapper around the
primitive function `internal--track-mouse', which isn't a special form
either. (Section 29.15 on Mouse Tracking also inaccruately refers to
`track-mouse' as a special form.)

On the other hand, the special form `inline' is not listed in the Special
Forms section.

A list of all special forms can be gotten with

(let (special-forms)
  (mapatoms
   (lambda (sym)
     (when (special-form-p sym)
       (push sym special-forms))))
  (sort special-forms #'string<))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32284; Package emacs. (Fri, 27 Jul 2018 00:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 32284 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: Nicholas Drozd <nicholasdrozd <at> gmail.com>
Cc: 32284 <at> debbugs.gnu.org
Subject: Re: bug#32284: special form documentation
Date: Thu, 26 Jul 2018 19:04:32 -0500
Nicholas Drozd writes:

> The Elisp manual section on Special Forms (10.2.7) lists around 
> two dozen
> special forms, but two of them aren't special forms.
>
> * `lambda', it turns out, is not a special form, but a macro 
> that wraps
> itself in a call to the special form `function'. (The 
> documentation for
> `lambda' refers to it as "self-quoting"; this might be better 
> changed to
> "self-evaluating".)
>
> * `track-mouse' isn't a special form, but a macro wrapper around 
> the
> primitive function `internal--track-mouse', which isn't a 
> special form
> either. (Section 29.15 on Mouse Tracking also inaccruately 
> refers to
> `track-mouse' as a special form.)
>
> On the other hand, the special form `inline' is not listed in 
> the Special
> Forms section.
>
> A list of all special forms can be gotten with
>
> (let (special-forms)
>   (mapatoms
>    (lambda (sym)
>      (when (special-form-p sym)
>        (push sym special-forms))))
>   (sort special-forms #'string<))

Hi Nicholas,

Thank you for the note. As far as I can see you are correct about 
the
method of implementation being macros. But that does not exclude 
them
from being special forms, as from my knowledge a special form is 
simply
an expression that does not follow the formal rules for the
implementation of a function.

Most lisps define their special forms from a small subset of 
primitives
such as lambda and macros, of which these apply.

Anybody else have any input?


-- 
Brett M. Gilio
Free Software Foundation, Member
https://parabola.nu | https://emacs.org




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 28 Jul 2018 07:27:01 GMT) Full text and rfc822 format available.

Notification sent to Nicholas Drozd <nicholasdrozd <at> gmail.com>:
bug acknowledged by developer. (Sat, 28 Jul 2018 07:27:01 GMT) Full text and rfc822 format available.

Message #13 received at 32284-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Brett Gilio <brettg <at> posteo.net>
Cc: 32284-done <at> debbugs.gnu.org, nicholasdrozd <at> gmail.com
Subject: Re: bug#32284: special form documentation
Date: Sat, 28 Jul 2018 10:26:43 +0300
> From: Brett Gilio <brettg <at> posteo.net>
> Date: Thu, 26 Jul 2018 19:04:32 -0500
> Cc: 32284 <at> debbugs.gnu.org
> 
> Anybody else have any input?

I do: the point about track-mouse is correct: it used to be a special
form (implemented in C), but nowadays is a macro.  So I removed it
from the list of special forms.

I didn't do anything about 'lambda', because its user-facing behavior
is that of a special form, and the fact that it is a thin wrapper
around 'function' is an implementation detail that doesn't necessarily
matter in this context.

With that, I'm closing this bug report.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Aug 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.