diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-08-20 19:52:40 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-08-21 08:57:59 +0200 |
commit | 3dcbea56f8219b6cdc21cac3baf18a02bfe6db5f (patch) | |
tree | cb4eb8221618d3b03cde691b55dc863a1f940e76 | |
parent | Optimise font-lock keyword collection (diff) | |
download | ebuild-mode-3dcbea56f8219b6cdc21cac3baf18a02bfe6db5f.tar.gz ebuild-mode-3dcbea56f8219b6cdc21cac3baf18a02bfe6db5f.tar.bz2 ebuild-mode-3dcbea56f8219b6cdc21cac3baf18a02bfe6db5f.zip |
Use push in init value
* ebuild-mode.el (ebuild-mode-arch-stable-list): Use push.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | ebuild-mode.el | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,7 @@ 2024-08-20 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-arch-stable-list): Use push. + * ebuild-mode.el (ebuild-mode-collect-and-split): Don't copy the element when creating a cons cell is enough. * test/ebuild-mode-tests.el (ebuild-mode-test-collect-and-split): diff --git a/ebuild-mode.el b/ebuild-mode.el index 7f3457a..9c190f8 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -157,7 +157,7 @@ Returns non-nil if A is less than B by Gentoo keyword ordering." (setq arch (match-string 1)) (and (not (member arch archs)) (member arch ebuild-mode-arch-list) - (setq archs (cons arch archs)))) + (push arch archs))) (sort archs #'ebuild-mode-arch-lessp))) (file-error nil)) (condition-case nil @@ -171,7 +171,7 @@ Returns non-nil if A is less than B by Gentoo keyword ordering." (setq arch (match-string 1)) (and (not (member arch archs)) (member arch ebuild-mode-arch-list) - (setq archs (cons arch archs)))) + (push arch archs))) (sort archs #'ebuild-mode-arch-lessp))) (file-error nil)) ;; fall back to list of all architectures |