unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* listp docstring.
@ 2006-01-30  4:31 Luc Teirlinck
  2006-01-30  4:54 ` Luc Teirlinck
  2006-01-30 23:25 ` Richard M. Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Luc Teirlinck @ 2006-01-30  4:31 UTC (permalink / raw)


I do not exactly want to start another thread of the car/cdr type.
But the docstring of listp _really_ can be unclear _even_ for people
who know Lisp.  The current docstring is:

Return t if object is a list.  This includes nil.

But "list" is ambiguous: its strict meaning, intended here, is
"cons cell or nil".  But it is very often used informally in the sense
of "true list", including in some other docstrings.  The car/cdr
thread has shown that there really is some potential confusion here,
since many people do understand list as "true list".

What about the following docstring, which I can install if desired:

Return t if OBJECT is a list, that is, a cons cell or nil.
Otherwise, return nil.

Sincerely,

Luc.

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

* Re: listp docstring.
  2006-01-30  4:31 listp docstring Luc Teirlinck
@ 2006-01-30  4:54 ` Luc Teirlinck
  2006-01-30 23:25 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2006-01-30  4:54 UTC (permalink / raw)


Maybe I should point out that the references to "list" in the
docstrings of car and cdr are not as ambiguous as the one in listp,
because these docstrings do contain a reference to "cons cell or nil"
in their second line.  This seems (to me) to make the meaning clear.
The present `listp' docstring contains no such reference.

Docstring of car:

     Return the car of list.  If arg is nil, return nil.
     Error if arg is not nil and not a cons cell.  See also `car-safe'.

     See Info node `(elisp)Cons Cells' for a discussion of related basic
     Lisp concepts such as car, cdr, cons cell and list.

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

* Re: listp docstring.
  2006-01-30  4:31 listp docstring Luc Teirlinck
  2006-01-30  4:54 ` Luc Teirlinck
@ 2006-01-30 23:25 ` Richard M. Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard M. Stallman @ 2006-01-30 23:25 UTC (permalink / raw)
  Cc: emacs-devel

    What about the following docstring, which I can install if desired:

    Return t if OBJECT is a list, that is, a cons cell or nil.
    Otherwise, return nil.

Please install it.

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

end of thread, other threads:[~2006-01-30 23:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-30  4:31 listp docstring Luc Teirlinck
2006-01-30  4:54 ` Luc Teirlinck
2006-01-30 23:25 ` Richard M. Stallman

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).