summaryrefslogtreecommitdiff
path: root/emacs/guix-read.el
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-05-02 17:53:40 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-05-02 17:53:40 +0200
commitc3052d6bcd2193b258fb92b99291a4918931fe36 (patch)
tree0e0cbbc019e68f4f1c865b4d2f5e341eb45d96ee /emacs/guix-read.el
parent0bfb9b439953b755a510974e51e651f79526a5a4 (diff)
parentb74f64a960542b0679ab13de0dd28adc496cf084 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-read.el')
-rw-r--r--emacs/guix-read.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emacs/guix-read.el b/emacs/guix-read.el
index a1a6b86364..5423c9bcfa 100644
--- a/emacs/guix-read.el
+++ b/emacs/guix-read.el
@@ -62,6 +62,12 @@
"Return a list of names of available licenses."
(guix-eval-read (guix-make-guile-expression 'license-names)))
+(guix-memoized-defun guix-package-locations ()
+ "Return a list of available package locations."
+ (sort (guix-eval-read (guix-make-guile-expression
+ 'package-location-files))
+ #'string<))
+
;;; Readers
@@ -131,6 +137,11 @@
:single-reader guix-read-license-name
:single-prompt "License: ")
+(guix-define-readers
+ :completions-getter guix-package-locations
+ :single-reader guix-read-package-location
+ :single-prompt "Location: ")
+
(provide 'guix-read)
;;; guix-read.el ends here