me
/
guix
Archived
1
0
Fork 0

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.
master
Alex Kost 2016-02-12 12:35:17 +03:00
parent cfb1c62aa9
commit 0338132e65
1 changed files with 3 additions and 1 deletions

View File

@ -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)