aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-buffer.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2016-02-12 12:35:17 +0300
committerAlex Kost <alezost@gmail.com>2016-02-22 22:29:56 +0300
commit0338132e655553358035f61df7e96f5cfac5378a (patch)
treece97c97d8854a5d1b7cebbf2a3d822fdad5617a3 /emacs/guix-buffer.el
parentcfb1c62aa98965daacb216713be650057188e65e (diff)
downloadguix-0338132e655553358035f61df7e96f5cfac5378a.tar
guix-0338132e655553358035f61df7e96f5cfac5378a.tar.gz
emacs: Set 'guix-buffer-item' before displaying entries.
* emacs/guix-buffer.el (guix-buffer-set): Set 'guix-buffer-item' early, so that it can be used during displaying entries. For example, this allows us to use a value of the current guix profile when package entries are inserted in a "List" or "Info" buffer.
Diffstat (limited to 'emacs/guix-buffer.el')
-rw-r--r--emacs/guix-buffer.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/guix-buffer.el b/emacs/guix-buffer.el
index af76e638b6..4cefe9989e 100644
--- a/emacs/guix-buffer.el
+++ b/emacs/guix-buffer.el
@@ -241,8 +241,10 @@ HISTORY should be one of the following:
`replace' - replace the current history item."
(guix-buffer-with-item buffer-item
(when %entries
- (guix-buffer-show-entries %entries %buffer-type %entry-type)
+ ;; Set buffer item before showing entries, so that its value can
+ ;; be used by the code for displaying entries.
(setq guix-buffer-item buffer-item)
+ (guix-buffer-show-entries %entries %buffer-type %entry-type)
(when history
(funcall (cl-ecase history
(add #'guix-history-add)