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:
parent
acbe32abdd
commit
09a66ceb5e
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue