GNU bug report logs - #24316
Mistake in GNU Emacs Lisp Reference Manual, Section 5.3

Previous Next

Package: emacs;

Reported by: Eric Wayman <ericwayman <at> fastmail.fm>

Date: Fri, 26 Aug 2016 20:55:02 UTC

Severity: minor

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Ken Brown <kbrown <at> cornell.edu>
To: Eric Wayman <ericwayman <at> fastmail.fm>, 24316 <at> debbugs.gnu.org
Subject: Re: bug#24316: Mistake in GNU Emacs Lisp Reference Manual, Section 5.3
Date: Fri, 26 Aug 2016 17:04:15 -0400
On 8/26/2016 4:53 PM, Eric Wayman wrote:
> With respect to
>
>  -- Function: safe-length list
>
> the text says
>
>     "If LIST is not ‘nil’ or a cons cell, ‘safe-length’ returns 0."
>
> But running
>
>     (safe-length nil)
>
> gives 0.

That case is covered by the first paragraph of the documentation, which 
you didn't quote:

     This function returns the length of LIST, with no risk of either an
     error or an infinite loop.  It generally returns the number of
     distinct cons cells in the list.  However, for circular lists, the
     value is just an upper bound; it is often too large.

Ken




This bug report was last modified 8 years and 270 days ago.

Previous Next


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