GNU bug report logs -
#12677
24.2.50; `nreverse' complains that ("foo") is not `listp'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Thu, 18 Oct 2012 19:28:01 UTC
Severity: normal
Found in version 24.2.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 12677-done <at> debbugs.gnu.org (full text, mbox):
> My guess is that the code ended up doing something morally equivalent
> to (nreverse '(1 2 . 3)). Try it and you'll see a similarly confusing
> error message.
I understand your guess, but I think that might not be what was happening. In
the debugger I evaluated the variable and saw that its full value was just that
singleton list.
But I'm OK with your closing this, as I cannot repro it from emacs -Q and it
does not interfere with my code.
> The reason is that by the time you get to the error, the list has
> already been "nreversed" by side-effect, so the arg (which
> still points to the cons cell which used to be the first element
> of the line) now still points to the same cons-cell, but that
> cons-cell's cdr has been set to nil because it was to become the
> last element of the returned list.
Do I understand correctly that a true list with a single element should not
present such a problem?
> I've installed a change in trunk which makes the above error
> include the problematic non-nil tail, rather than the first
> element who looks confusingly normal.
Sounds good.
This bug report was last modified 12 years and 272 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.