GNU bug report logs -
#62037
(proper-list-p '#1=(a #1#)) => 2. It should return nil.
Previous Next
Full log
Message #26 received at 62037 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
>> So, it all boils down to the fact that the current documentation is
>> lacking and/or ambiguous, in terms of "the purpose of `proper-list-p'",
>> as well as the two definitions of the adjective "circular", which are
>> not interchangeable in different contexts.
>
> It might be lacking, but I don't think the explanation is ambiguous.
> "its last cdr is nil" might not be awfully formal, but it does describe
> the problem.
I agree. However, I would reorganize it slightly to make "cdr being
nil" stand out more. See this snippet for `proper-list-p' docstring,
and note that I explicitly mentioned circular _list_ to avoid confusion.
--8<---------------cut here---------------start------------->8---
- A proper list is neither circular nor dotted (i.e., its last cdr is nil).
+ A proper list is a list whose last cdr is nil (i.e., neither a circular list nor dotted list).
--8<---------------cut here---------------end--------------->8---
Again, I find it problematic that there are two related definitions of
"circular", and the first search result for "circular" under Elisp info
manual is (info "(elisp) Circular Objects"), which is not what is
intended for `proper-list-p'. This causes problems in understanding the
intended behavior of this function, manifested via this bug.
--
Best,
RY
This bug report was last modified 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.