aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-main.scm
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r--emacs/guix-main.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index 191aa8d5cf..341657d931 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -942,3 +942,14 @@ GENERATIONS is a list of generation numbers."
(map (lambda (checker)
(symbol->string (lint-checker-name checker)))
%checkers))
+
+(define (package-names)
+ "Return a list of names of available packages."
+ (delete-duplicates
+ (fold-packages (lambda (pkg res)
+ (cons (package-name pkg) res))
+ '())))
+
+;; See the comment to 'guix-package-names' function in "guix-popup.el".
+(define (package-names-lists)
+ (map list (package-names)))