diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-11-16 09:50:45 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-11-16 09:57:33 -0500 |
commit | 44b5761b44aee8d7864b5aab6c324d26de55914c (patch) | |
tree | 8d5eab3f800a88cbd38657234980c51dc861013e /lisp/subr.el | |
parent | cf00f1526d04c0798a6a38c005b5704cf3b825f0 (diff) | |
download | emacs-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.el | 1 |
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 |