summaryrefslogtreecommitdiff
path: root/emacs/guix-ui-package.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-12-18 11:34:48 +0300
committerAlex Kost <alezost@gmail.com>2016-01-02 17:25:35 +0300
commit494a62f215c9b6dc66737f6a46f4c538715a56ec (patch)
tree7d5b5b9a031549615a231d0a24aecbf1d2bfb440 /emacs/guix-ui-package.el
parent8ed2c92eb12b894e03cc634d92d3c78636f44020 (diff)
downloadguix-patches-494a62f215c9b6dc66737f6a46f4c538715a56ec.tar
guix-patches-494a62f215c9b6dc66737f6a46f4c538715a56ec.tar.gz
emacs: Add 'guix-ui-read-profile'.
* emacs/guix-ui.el (guix-ui-read-profile): New procedure. * emacs/guix-ui-package.el (guix-search-by-name) (guix-search-by-regexp, guix-installed-packages) (guix-obsolete-packages, guix-all-available-packages) (guix-newest-available-packages): Use it. * emacs/guix-ui-generation.el (guix-generations) (guix-last-generations, guix-generations-by-time): Use it.
Diffstat (limited to 'emacs/guix-ui-package.el')
-rw-r--r--emacs/guix-ui-package.el23
1 files changed, 6 insertions, 17 deletions
diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el
index b457539c0d..7d2ce1065d 100644
--- a/emacs/guix-ui-package.el
+++ b/emacs/guix-ui-package.el
@@ -886,8 +886,7 @@ If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-string "Package name: " nil 'guix-package-search-history)
- (and current-prefix-arg
- (guix-profile-prompt))))
+ (guix-ui-read-profile)))
(guix-package-get-display profile 'name name))
;;;###autoload
@@ -900,9 +899,7 @@ If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
(interactive
(list (read-regexp "Regexp: " nil 'guix-package-search-history)
- nil
- (and current-prefix-arg
- (guix-profile-prompt))))
+ nil (guix-ui-read-profile)))
(guix-package-get-display profile 'regexp regexp
(or params guix-package-search-params)))
@@ -911,9 +908,7 @@ Interactively with prefix, prompt for PROFILE."
"Display information about installed Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
- (interactive
- (list (and current-prefix-arg
- (guix-profile-prompt))))
+ (interactive (list (guix-ui-read-profile)))
(guix-package-get-display profile 'installed))
;;;###autoload
@@ -921,9 +916,7 @@ Interactively with prefix, prompt for PROFILE."
"Display information about obsolete Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
- (interactive
- (list (and current-prefix-arg
- (guix-profile-prompt))))
+ (interactive (list (guix-ui-read-profile)))
(guix-package-get-display profile 'obsolete))
;;;###autoload
@@ -931,9 +924,7 @@ Interactively with prefix, prompt for PROFILE."
"Display information about all available Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
- (interactive
- (list (and current-prefix-arg
- (guix-profile-prompt))))
+ (interactive (list (guix-ui-read-profile)))
(guix-package-get-display profile 'all-available))
;;;###autoload
@@ -941,9 +932,7 @@ Interactively with prefix, prompt for PROFILE."
"Display information about the newest available Guix packages.
If PROFILE is nil, use `guix-current-profile'.
Interactively with prefix, prompt for PROFILE."
- (interactive
- (list (and current-prefix-arg
- (guix-profile-prompt))))
+ (interactive (list (guix-ui-read-profile)))
(guix-package-get-display profile 'newest-available))
(provide 'guix-ui-package)