diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ebuild-mode.el | 26 |
2 files changed, 9 insertions, 20 deletions
@@ -1,5 +1,8 @@ 2024-10-08 Ulrich Müller <ulm@gentoo.org> + * ebuild-mode.el (ebuild-mode-arch-stable-list): Don't fall back + to profiles.desc to determine whether an arch has stable keywords. + * Makefile (EMACSFLAGS): Use single hyphen for compatibility. * ebuild-mode.el (ebuild-mode-collect-and-split): Preserve order. diff --git a/ebuild-mode.el b/ebuild-mode.el index d0a25e0..9f4b3c2 100644 --- a/ebuild-mode.el +++ b/ebuild-mode.el @@ -150,33 +150,19 @@ Returns non-nil if A is less than B by Gentoo keyword ordering." (defvar ebuild-mode-arch-stable-list (or - ;; try to read arches.desc (GLEP 72) first, then profiles.desc + ;; try to read arches.desc (GLEP 72) first (condition-case nil (with-temp-buffer (insert-file-contents-literally (concat ebuild-mode-portdir "/profiles/arches.desc")) - (let (arch archs) + (let (archs) (while (re-search-forward "^[ \t]*\\([^ \t\n#]+\\)[ \t]+\\(stable\\|transitional\\)\\>" nil t) - (setq arch (match-string 1)) - (and (not (member arch archs)) - (member arch ebuild-mode-arch-list) - (push arch archs))) - (sort archs #'ebuild-mode-arch-lessp))) - (file-error nil)) - (condition-case nil - (with-temp-buffer - (insert-file-contents-literally - (concat ebuild-mode-portdir "/profiles/profiles.desc")) - (let (arch archs) - (while (re-search-forward - "^[ \t]*\\([^ \t\n#]+\\)[ \t]+[^ \t\n#]+[ \t]+stable\\>" - nil t) - (setq arch (match-string 1)) - (and (not (member arch archs)) - (member arch ebuild-mode-arch-list) - (push arch archs))) + (let ((arch (match-string 1))) + (and (not (member arch archs)) + (member arch ebuild-mode-arch-list) + (push arch archs)))) (sort archs #'ebuild-mode-arch-lessp))) (file-error nil)) ;; fall back to list of all architectures |