From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: [PATCH 1/4] emacs: Make "guix-emacs.el" independent. Date: Wed, 6 Jan 2016 19:55:02 +0300 Message-ID: <1452099305-746-2-git-send-email-alezost@gmail.com> References: <1452099305-746-1-git-send-email-alezost@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGrNZ-0003R6-Ap for guix-devel@gnu.org; Wed, 06 Jan 2016 11:56:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGrNY-00014m-9O for guix-devel@gnu.org; Wed, 06 Jan 2016 11:56:09 -0500 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:35000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGrNY-00014e-1f for guix-devel@gnu.org; Wed, 06 Jan 2016 11:56:08 -0500 Received: by mail-lf0-x232.google.com with SMTP id c192so140371201lfe.2 for ; Wed, 06 Jan 2016 08:56:07 -0800 (PST) Received: from localhost.localdomain ([217.107.192.146]) by smtp.gmail.com with ESMTPSA id h9sm17188380lbj.42.2016.01.06.08.56.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jan 2016 08:56:01 -0800 (PST) In-Reply-To: <1452099305-746-1-git-send-email-alezost@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org "guix-emacs.el" may be used just for "instructing" Emacs where to find Emacs packages installed with Guix, so it should have as minimal dependencies as possible. See . * 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 file 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 +;; Copyright © 2014, 2015, 2016 Alex Kost ;; 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 -- 2.6.3