GNU bug report logs - #26440
seq-mapn fails with circular sequence

Previous Next

Package: emacs;

Reported by: "Phillip Lord" <phillip.lord <at> russet.org.uk>

Date: Tue, 11 Apr 2017 08:14:02 UTC

Severity: normal

Fixed in version 26.1

Done: Nicolas Petton <nicolas <at> petton.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Phillip Lord" <phillip.lord <at> russet.org.uk>
To: 26440 <at> debbugs.gnu.org
Subject: bug#26440: seq-mapn fails with circular sequence
Date: Tue, 11 Apr 2017 08:12:40 -0000
On Emacs-25 circular structures cause seq-mapn not to terminate
although the documentation suggest that they should.

Consider:

    (defvar l '(a c d))
    (setq l (nconc l l))
    (seq-mapn #'cons l '(1))

This should return '((a . 1)) but actually does not terminate.

The problem is caused by call to seq-into which includes:

    (append sequence nil)

The problem does exist on trunk which does this instead:

    (if (listp sequence)
        sequence
      (append sequence nil)))







This bug report was last modified 7 years and 354 days ago.

Previous Next


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