1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Fix circular list handling in seq-mapn

* lisp/emacs-lisp/seq.el (seq-mapn): Do not copy list arguments.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-mapn-circular-lists):
  Add a regression test.
This commit is contained in:
Nicolas Petton 2016-12-15 10:24:57 +01:00
parent acbe32abdd
commit 09a66ceb5e
2 changed files with 9 additions and 1 deletions

View file

@ -386,5 +386,10 @@ Evaluate BODY for each created sequence.
(should-error (seq-random-elt []))
(should-error (seq-random-elt "")))
(ert-deftest test-seq-mapn-circular-lists ()
(let ((l1 '#1=(1 . #1#)))
(should (equal (seq-mapn #'+ '(3 4 5 7) l1)
'(4 5 6 8)))))
(provide 'seq-tests)
;;; seq-tests.el ends here