guix-commits
[Top][All Lists]
Advanced

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

03/04: emacs: Make "guix-emacs.el" independent.


From: Alex Kost
Subject: 03/04: emacs: Make "guix-emacs.el" independent.
Date: Wed, 13 Jan 2016 14:59:26 +0000

alezost pushed a commit to branch master
in repository guix.

commit e4e2154644ecf76ea02a50304c1405c00c9ffdd1
Author: Alex Kost <address@hidden>
Date:   Sat Jan 2 16:52:39 2016 +0300

    emacs: Make "guix-emacs.el" independent.
    
    "guix-emacs.el" may be used just for "instructing" Emacs where to find
    Emacs packages installed with Guix, so it should have as few
    dependencies as possible.
    
    See <http://lists.gnu.org/archive/html/guix-devel/2016-01/msg00022.html>.
    
    * emacs/guix-emacs.el: Require 'guix-profiles' optionally.
      (guix-emacs-load-autoloads): Use 'guix-profile-prompt' only if it is
      available.
---
 emacs/guix-emacs.el |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/emacs/guix-emacs.el b/emacs/guix-emacs.el
index 2f809ed..311ab33 100644
--- a/emacs/guix-emacs.el
+++ b/emacs/guix-emacs.el
@@ -1,6 +1,6 @@
 ;;; guix-emacs.el --- Emacs packages installed with Guix
 
-;; Copyright © 2014 Alex Kost <address@hidden>
+;; Copyright © 2014, 2015, 2016 Alex Kost <address@hidden>
 
 ;; This file is part of GNU Guix.
 
@@ -24,8 +24,9 @@
 
 ;;; Code:
 
-(require 'guix-profiles)
 (require 'cl-lib)
+(unless (require 'guix-profiles nil t)
+  (defvar guix-user-profile (expand-file-name "~/.guix-profile")))
 
 (defcustom guix-emacs-activate-after-operation t
   "Activate Emacs packages after installing.
@@ -90,7 +91,9 @@ Return nil if there are no emacs packages installed in 
PROFILE."
   "Load autoloads for Emacs packages installed in PROFILE.
 If PROFILE is nil, use `guix-user-profile'.
 Add autoloads directories to `load-path'."
-  (interactive (list (guix-profile-prompt)))
+  (interactive (list (if (fboundp 'guix-profile-prompt)
+                         (funcall 'guix-profile-prompt)
+                       guix-user-profile)))
   (let* ((autoloads     (guix-emacs-find-autoloads profile))
          (new-autoloads (cl-nset-difference autoloads
                                             guix-emacs-autoloads



reply via email to

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