diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-01-13 17:50:17 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-01-13 18:18:48 +0100 |
commit | 8c986ab12034d67db836a881f57c69754d8073ae (patch) | |
tree | bf5183011119695ac549d4cfff4dc2175e659397 /emacs/guix-emacs.el | |
parent | 203795aceaabec0e0e5818e1650ad407d825d1b3 (diff) | |
parent | 7a2eed3aac1ecd0bdf293e33a234fad58f2e5f9e (diff) | |
download | guix-8c986ab12034d67db836a881f57c69754d8073ae.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-emacs.el')
-rw-r--r-- | emacs/guix-emacs.el | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/emacs/guix-emacs.el b/emacs/guix-emacs.el index 2f809ed16e..37a0bb26d3 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 <alezost@gmail.com> +;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com> ;; This file is part of GNU Guix. @@ -24,8 +24,17 @@ ;;; Code: -(require 'guix-profiles) (require 'cl-lib) +(unless (require 'guix-profiles nil t) + (defvar guix-user-profile (expand-file-name "~/.guix-profile"))) + +(defcustom guix-package-enable-at-startup t + "If non-nil, activate Emacs packages installed in a user profile. +Set this variable to nil before requiring `guix-emacs' file to +avoid loading autoloads of Emacs packages installed in +`guix-user-profile'." + :type 'boolean + :group 'guix) (defcustom guix-emacs-activate-after-operation t "Activate Emacs packages after installing. @@ -90,7 +99,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 @@ -114,6 +125,10 @@ See `guix-emacs-activate-after-operation' for details." ;; profile will not be loaded). (guix-emacs-load-autoloads guix-current-profile))) +(when guix-package-enable-at-startup + (add-to-list 'load-path (guix-emacs-directory)) + (guix-emacs-load-autoloads)) + (provide 'guix-emacs) ;;; guix-emacs.el ends here |