summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2023-11-16 09:50:45 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2023-11-16 09:57:33 -0500
commit44b5761b44aee8d7864b5aab6c324d26de55914c (patch)
tree8d5eab3f800a88cbd38657234980c51dc861013e /lisp/subr.el
parentcf00f1526d04c0798a6a38c005b5704cf3b825f0 (diff)
downloademacs-44b5761b44aee8d7864b5aab6c324d26de55914c.tar.gz
(merge-ordered-lists): Dot a few more `i`s
Suggested by Mattias EngdegÄrd. * lisp/subr.el (merge-ordered-lists): Don't mutate the arg. * test/lisp/subr-tests.el (subr-tests--merge-ordered-lists): Make the test a bit more precise.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index abc937531ad..12f37d66ac1 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2695,6 +2695,7 @@ By default we choose the head of the first list."
;; Algorithm inspired from
;; [C3](https://en.wikipedia.org/wiki/C3_linearization)
(let ((result '()))
+ (setq lists (remq nil lists)) ;Don't mutate the original `lists' argument.
(while (cdr (setq lists (delq nil lists)))
;; Try to find the next element of the result. This
;; is achieved by considering the first element of each