guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: emacs: Set 'guix-buffer-item' before displaying entries.


From: Alex Kost
Subject: 02/03: emacs: Set 'guix-buffer-item' before displaying entries.
Date: Mon, 22 Feb 2016 19:45:42 +0000

alezost pushed a commit to branch master
in repository guix.

commit 0338132e655553358035f61df7e96f5cfac5378a
Author: Alex Kost <address@hidden>
Date:   Fri Feb 12 12:35:17 2016 +0300

    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.
---
 emacs/guix-buffer.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/emacs/guix-buffer.el b/emacs/guix-buffer.el
index af76e63..4cefe99 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]