GNU bug report logs - #18555
24.4.50; butlast and nbutlast doesn't handle improper lists

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Thu, 25 Sep 2014 04:07:02 UTC

Severity: minor

Tags: notabug, wontfix

Found in version 24.4.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Andreas Schwab <schwab <at> suse.de>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 18555 <at> debbugs.gnu.org
Subject: Re: bug#18555: 24.4.50;
 butlast and nbutlast doesn't handle improper lists
Date: Thu, 25 Sep 2014 09:21:50 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

>   (nbutlast '(1 2 . 3))
>
> throws an error due to `length' which can be fixed
> by using safe-length instead.
>
>   (butlast '(1 2 . 3))
>
> still throws an error due to copy-sequence not taking
> improper list.
>
> What is the right thing to do?

Don't do that then.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




This bug report was last modified 5 years and 293 days ago.

Previous Next


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