summary refs log tree commit diff
path: root/emacs/guix-main.scm
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-10-10 23:50:15 +0400
committerAlex Kost <alezost@gmail.com>2014-10-13 14:59:35 +0400
commitc2379b3c1fe169b56d7d960fa31b1d191a779b1b (patch)
treeed20b1173aafbf971e062b550d30ea8a01932cde /emacs/guix-main.scm
parent0546393164d30c6722ddbf17fc05c424a57e71a4 (diff)
downloadguix-c2379b3c1fe169b56d7d960fa31b1d191a779b1b.tar.gz
emacs: Add 'current' generation parameter.
* emacs/guix-main.scm (generation-param-alist): Add 'current' parameter.
* emacs/guix-base.el (guix-param-titles): Add title for 'current' parameter.
* emacs/guix-info.el: Display 'current' parameter.
  (guix-generation-info-current, guix-generation-info-not-current): New faces.
  (guix-generation-info-insert-current): New procedure.
* emacs/guix-list.el: Display 'current' column.
  (guix-generation-list-get-current): New procedure.
Diffstat (limited to 'emacs/guix-main.scm')
-rw-r--r--emacs/guix-main.scm15
1 files changed, 8 insertions, 7 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm
index fe599fbf11..7e26876dfa 100644
--- a/emacs/guix-main.scm
+++ b/emacs/guix-main.scm
@@ -638,13 +638,14 @@ See 'entry-sexps' for details."
 
 (define (generation-param-alist profile)
   "Return an alist of generation parameters and procedures for PROFILE."
-  (list
-   (cons 'id          identity)
-   (cons 'number      identity)
-   (cons 'prev-number (cut previous-generation-number profile <>))
-   (cons 'path        (cut generation-file-name profile <>))
-   (cons 'time        (lambda (gen)
-                        (time-second (generation-time profile gen))))))
+  (let ((current (generation-number profile)))
+    `((id          . ,identity)
+      (number      . ,identity)
+      (prev-number . ,(cut previous-generation-number profile <>))
+      (current     . ,(cut = current <>))
+      (path        . ,(cut generation-file-name profile <>))
+      (time        . ,(lambda (gen)
+                        (time-second (generation-time profile gen)))))))
 
 (define (matching-generations profile predicate)
   "Return a list of PROFILE generations matching PREDICATE."