]> git.eshelyaron.com Git - emacs.git/commit
Fix mutates-arguments warning for `sort`
authorMattias EngdegÄrd <mattiase@acm.org>
Sun, 31 Mar 2024 14:12:45 +0000 (16:12 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Apr 2024 13:24:07 +0000 (15:24 +0200)
commit4d8307c4f7a25b5323b41317ca4a4db221003dbc
treeeab7151b07a73a6fcb527b0eae9c47b1f0fca926
parente07cb7c32a07e319e1cdbba2159b7ec307fec8d0
Fix mutates-arguments warning for `sort`

* lisp/emacs-lisp/bytecomp.el (bytecomp--sort-call-in-place-p)
(bytecomp--mutargs-nconc, bytecomp--mutargs-sort): New.
(byte-compile-form, bytecomp--actually-important-return-value-p)
(mutating-fns):
Use a slightly more extendible scheme for specifying what arguments
a function mutates.  Give `sort` special treatment.

(cherry picked from commit 155462a1bd7909074f79a534324c7b209eb97142)
lisp/emacs-lisp/bytecomp.el