all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string")
       [not found] ` <20190207085734.B17CF2047A@vcs0.savannah.gnu.org>
@ 2019-02-07 13:12   ` Stefan Monnier
  2019-02-07 13:30     ` Quoting t and nil in docstrings Robert Pluim
                       ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Monnier @ 2019-02-07 13:12 UTC (permalink / raw)
  To: emacs-devel; +Cc: Aurelien Aptel

>     Revert "Fix typo in add-hook doc string"
[...]
> -This makes the hook buffer-local, and it makes it a member of the
> +This makes the hook buffer-local, and it makes t a member of the

This is as good an opportunity as any to question our long-standing
convention that the symbols `nil` and `t` are treated specially in
docstrings in the sense that we don't surround them with the customary
`...'.

FWIW, I don't find this exception to be beneficial here, nor in cases
like:

    `foo' means ...
    `bar' means ...
    nil   means ...
    t     means ...

Or when a sentence starts with "nil" (where the lack of capital letter
looks like a typo).

I think we could at least change our convention to say that nil and
t don't have to be quoted rather than to say that they should not
be quoted.


        Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Quoting t and nil in docstrings
  2019-02-07 13:12   ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Stefan Monnier
@ 2019-02-07 13:30     ` Robert Pluim
  2019-02-07 14:52     ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Drew Adams
  2019-02-08  3:19     ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Pluim @ 2019-02-07 13:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Aurelien Aptel, emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>     Revert "Fix typo in add-hook doc string"
> [...]
>> -This makes the hook buffer-local, and it makes it a member of the
>> +This makes the hook buffer-local, and it makes t a member of the
>
> This is as good an opportunity as any to question our long-standing
> convention that the symbols `nil` and `t` are treated specially in
> docstrings in the sense that we don't surround them with the customary
> `...'.
>
> FWIW, I don't find this exception to be beneficial here, nor in cases
> like:
>
>     `foo' means ...
>     `bar' means ...
>     nil   means ...
>     t     means ...
>
> Or when a sentence starts with "nil" (where the lack of capital letter
> looks like a typo).
>
> I think we could at least change our convention to say that nil and
> t don't have to be quoted rather than to say that they should not
> be quoted.

Aren't you supposed to say @code{t} in texinfo? That seems
inconsistent with not quoting in docstrings.

Robert



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string")
  2019-02-07 13:12   ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Stefan Monnier
  2019-02-07 13:30     ` Quoting t and nil in docstrings Robert Pluim
@ 2019-02-07 14:52     ` Drew Adams
  2019-02-08  3:19     ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2019-02-07 14:52 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel; +Cc: Aurelien Aptel

> >     Revert "Fix typo in add-hook doc string"
> [...]
> > -This makes the hook buffer-local, and it makes it a member of the
> > +This makes the hook buffer-local, and it makes t a member of the
> 
> This is as good an opportunity as any to question our long-standing
> convention that the symbols `nil` and `t` are treated specially in
> docstrings in the sense that we don't surround them with the customary
> `...'.
> 
> FWIW, I don't find this exception to be beneficial here, nor in cases
> like:
> 
>     `foo' means ...
>     `bar' means ...
>     nil   means ...
>     t     means ...
> 
> Or when a sentence starts with "nil" (where the lack of capital letter
> looks like a typo).
> 
> I think we could at least change our convention to say that nil and
> t don't have to be quoted rather than to say that they should not
> be quoted.

+1

The (new) convention could be discretionary.
There are likely some contexts where it is not
necessary (but it wouldn't hurt).



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string")
  2019-02-07 13:12   ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Stefan Monnier
  2019-02-07 13:30     ` Quoting t and nil in docstrings Robert Pluim
  2019-02-07 14:52     ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Drew Adams
@ 2019-02-08  3:19     ` Richard Stallman
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2019-02-08  3:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: aaptel, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > This is as good an opportunity as any to question our long-standing
  > convention that the symbols `nil` and `t` are treated specially in
  > docstrings in the sense that we don't surround them with the customary
  > `...'.

I decided on that exception because generally it is convenient.
Symbols as fundamental as t and nil don't need markup.

  > I think we could at least change our convention to say that nil and
  > t don't have to be quoted rather than to say that they should not
  > be quoted.

I would agree with saying it is ok to give them quotes in special cases
where that makes the text clearer.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-08  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190207085733.4723.6852@vcs0.savannah.gnu.org>
     [not found] ` <20190207085734.B17CF2047A@vcs0.savannah.gnu.org>
2019-02-07 13:12   ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Stefan Monnier
2019-02-07 13:30     ` Quoting t and nil in docstrings Robert Pluim
2019-02-07 14:52     ` Quoting t and nil in docstrings (was: [Emacs-diffs] master b952385: Revert "Fix typo in add-hook doc string") Drew Adams
2019-02-08  3:19     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.