diff options
author | Alex Kost <alezost@gmail.com> | 2016-01-06 17:58:05 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2016-01-13 17:56:14 +0300 |
commit | 6d268e528100b7b4376390c2d3f93756dc97166e (patch) | |
tree | 1f3ab8d1e80b1782301568b6f482d4d1ead73fbf /emacs/guix-emacs.el | |
parent | e4e2154644ecf76ea02a50304c1405c00c9ffdd1 (diff) | |
download | gnu-guix-6d268e528100b7b4376390c2d3f93756dc97166e.tar gnu-guix-6d268e528100b7b4376390c2d3f93756dc97166e.tar.gz |
emacs: Move loading packages to "guix-emacs.el".
* emacs/guix-init.el: Move the code for auto-loading Emacs packages to...
(guix-package-enable-at-startup): Move to...
* emacs/guix-emacs.el (guix-package-enable-at-startup): ... here.
Diffstat (limited to 'emacs/guix-emacs.el')
-rw-r--r-- | emacs/guix-emacs.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/emacs/guix-emacs.el b/emacs/guix-emacs.el index 311ab3323f..37a0bb26d3 100644 --- a/emacs/guix-emacs.el +++ b/emacs/guix-emacs.el @@ -28,6 +28,14 @@ (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. If nil, do not load autoloads of the Emacs packages after @@ -117,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 |