Skip to content
Snippets Groups Projects
Commit e4e21546 authored by Alex Kost's avatar Alex Kost
Browse files

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.
parent 08207339
No related branches found
No related tags found
No related merge requests found
;;; guix-emacs.el --- Emacs packages installed with Guix ;;; guix-emacs.el --- Emacs packages installed with Guix
;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com>
;; This file is part of GNU Guix. ;; This file is part of GNU Guix.
...@@ -24,8 +24,9 @@ ...@@ -24,8 +24,9 @@
;;; Code: ;;; Code:
(require 'guix-profiles)
(require 'cl-lib) (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 (defcustom guix-emacs-activate-after-operation t
"Activate Emacs packages after installing. "Activate Emacs packages after installing.
...@@ -90,7 +91,9 @@ Return nil if there are no emacs packages installed in PROFILE." ...@@ -90,7 +91,9 @@ Return nil if there are no emacs packages installed in PROFILE."
"Load autoloads for Emacs packages installed in PROFILE. "Load autoloads for Emacs packages installed in PROFILE.
If PROFILE is nil, use `guix-user-profile'. If PROFILE is nil, use `guix-user-profile'.
Add autoloads directories to `load-path'." 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)) (let* ((autoloads (guix-emacs-find-autoloads profile))
(new-autoloads (cl-nset-difference autoloads (new-autoloads (cl-nset-difference autoloads
guix-emacs-autoloads guix-emacs-autoloads
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment