aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-base.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-11-18 11:36:27 +0300
committerAlex Kost <alezost@gmail.com>2016-01-02 17:25:35 +0300
commit0b9cd3206ab9ba4f8fd55139d42cdf5265c4b0e1 (patch)
treec7ca2b7c5a0845f3ae91634efbd3ba89054e463e /emacs/guix-base.el
parente86a43d47108688d7412796fb03caa47f87279f0 (diff)
downloadgnu-guix-0b9cd3206ab9ba4f8fd55139d42cdf5265c4b0e1.tar
gnu-guix-0b9cd3206ab9ba4f8fd55139d42cdf5265c4b0e1.tar.gz
emacs: Rename internal procedures.
* emacs/guix-list.el (guix-list-get-param-title): Rename to... (guix-list-param-title): ... this. (guix-list-get-column-format): Rename to... (guix-list-format): ... this. (guix-list-get-displayed-params): Rename to... (guix-list-displayed-params): ... this. (guix-list-get-sort-key): Rename to... (guix-list-tabulated-sort-key): ... this. (guix-list-make-tabulated-vector): Rename to... (guix-list-tabulated-vector): ... this. (guix-list-get-list-format): Rename to... (guix-list-tabulated-format): ... this. (guix-list-get-tabulated-entries): Rename to... (guix-list-tabulated-entries): ... this. (guix-list-get-tabulated-entry): Rename to... (guix-list-tabulated-entry): ... this. * emacs/guix-info.el (guix-info-get-displayed-params): Rename to... (guix-info-displayed-params): ... this. * emacs/guix-base.el (guix-get-params-for-receiving): Adjust accordingly. (guix-get-name-spec): Rename to... (guix-package-name-specification): ... this. (guix-get-full-name): Merge this and... (guix-entry-to-specification): ... this into... (guix-package-entry->name-specification): ... this. (guix-get-installed-outputs): Rename to... (guix-package-installed-outputs): ... this. (guix-get-package-id-and-output-by-output-id): Rename to... (guix-package-id-and-output-by-output-id): ... this.
Diffstat (limited to 'emacs/guix-base.el')
-rw-r--r--emacs/guix-base.el35
1 files changed, 16 insertions, 19 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el
index 43dec3dca3..91b52db188 100644
--- a/emacs/guix-base.el
+++ b/emacs/guix-base.el
@@ -61,35 +61,31 @@ Each element of the list has a form:
entry-type param)
(guix-symbol-title param)))
-(defun guix-get-name-spec (name version &optional output)
+(defun guix-package-name-specification (name version &optional output)
"Return Guix package specification by its NAME, VERSION and OUTPUT."
(concat name "-" version
(when output (concat ":" output))))
-(defun guix-get-full-name (entry &optional output)
+(defun guix-package-entry->name-specification (entry &optional output)
"Return name specification of the package ENTRY and OUTPUT."
- (guix-get-name-spec (guix-entry-value entry 'name)
- (guix-entry-value entry 'version)
- output))
+ (guix-package-name-specification
+ (guix-entry-value entry 'name)
+ (guix-entry-value entry 'version)
+ (or output (guix-entry-value entry 'output))))
-(defun guix-entry-to-specification (entry)
- "Return name specification by the package or output ENTRY."
- (guix-get-name-spec (guix-entry-value entry 'name)
- (guix-entry-value entry 'version)
- (guix-entry-value entry 'output)))
-
-(defun guix-entries-to-specifications (entries)
+(defun guix-package-entries->name-specifications (entries)
"Return name specifications by the package or output ENTRIES."
- (cl-remove-duplicates (mapcar #'guix-entry-to-specification entries)
+ (cl-remove-duplicates (mapcar #'guix-package-entry->name-specification
+ entries)
:test #'string=))
-(defun guix-get-installed-outputs (entry)
+(defun guix-package-installed-outputs (entry)
"Return list of installed outputs for the package ENTRY."
(mapcar (lambda (installed-entry)
(guix-entry-value installed-entry 'output))
(guix-entry-value entry 'installed)))
-(defun guix-get-package-id-and-output-by-output-id (oid)
+(defun guix-package-id-and-output-by-output-id (oid)
"Return list (PACKAGE-ID OUTPUT) by output id OID."
(cl-multiple-value-bind (pid-str output)
(split-string oid ":")
@@ -567,7 +563,7 @@ If NO-DISPLAY is non-nil, do not switch to the buffer."
(required (symbol-value required-var)))
(unless (equal required 'all)
(cl-union required
- (funcall (guix-get-symbol "get-displayed-params"
+ (funcall (guix-get-symbol "displayed-params"
buffer-type)
entry-type)))))
@@ -596,8 +592,9 @@ See `revert-buffer' for the meaning of NOCONFIRM."
(eq guix-entry-type 'output)))
(progn
(setq search-type 'name
- search-vals (guix-entries-to-specifications
- guix-entries))
+ search-vals
+ (guix-package-entries->name-specifications
+ guix-entries))
(guix-get-entries
guix-profile guix-entry-type
search-type search-vals params))
@@ -902,7 +899,7 @@ ENTRIES is a list of package entries to get info about packages."
(entry (guix-entry-by-id id entries)))
(when entry
(let ((location (guix-entry-value entry 'location)))
- (concat (guix-get-full-name entry)
+ (concat (guix-package-entry->name-specification entry)
(when outputs
(concat ":"
(guix-concat-strings outputs ",")))