1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00

Revert "Add macro seq-setq."

This reverts commit a8a3fd8f8e.

The same patch was applied twice.  Remove the second instance.
This commit is contained in:
Lars Ingebrigtsen 2021-08-14 15:30:17 +02:00
parent 22d8e71d04
commit 3fd0cc85a5
2 changed files with 0 additions and 41 deletions

View File

@ -1128,23 +1128,6 @@ assigned to variables as if by @code{setq} instead of as in a
@end example
@end defmac
@defmac seq-setq var-sequence val-sequence
@cindex sequence destructuring
This macro works similarly to @code{seq-let}, except that values are
assigned to variables as if by @code{setq} instead of as in a
@code{let} binding.
@example
@group
(let ((a nil)
(b nil))
(seq-setq (_ a _ b) '(1 2 3 4))
(list a b))
@result{} (2 4)
@end group
@end example
@end defmac
@defun seq-random-elt sequence
This function returns an element of @var{sequence} taken at random.

View File

@ -407,30 +407,6 @@ Evaluate BODY for each created sequence.
(should (null b))
(should (null c))))
(ert-deftest test-seq-setq ()
(with-test-sequences (seq '(1 2 3 4))
(let (a b c d e)
(seq-setq (a b c d e) seq)
(should (= a 1))
(should (= b 2))
(should (= c 3))
(should (= d 4))
(should (null e)))
(let (a b others)
(seq-setq (a b &rest others) seq)
(should (= a 1))
(should (= b 2))
(should (same-contents-p others (seq-drop seq 2)))))
(let ((a)
(seq '(1 (2 (3 (4))))))
(seq-setq (_ (_ (_ (a)))) seq)
(should (= a 4)))
(let (seq a b c)
(seq-setq (a b c) seq)
(should (null a))
(should (null b))
(should (null c))))
(ert-deftest test-seq-min-max ()
(with-test-sequences (seq '(4 5 3 2 0 4))
(should (= (seq-min seq) 0))