aboutsummaryrefslogtreecommitdiff
path: root/emacs/guix-init.el.in
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2014-11-30 23:38:43 +0300
committerAlex Kost <alezost@gmail.com>2014-12-02 22:09:23 +0300
commit12f2490aa3b9341e6df9df75bf88d7b2b502376d (patch)
treeb77908ec7556df2358fe129f05c3b3e72c6a532b /emacs/guix-init.el.in
parent3db349cb09844e2770be3d0dee4e990f1228c2b6 (diff)
downloadpatches-12f2490aa3b9341e6df9df75bf88d7b2b502376d.tar
patches-12f2490aa3b9341e6df9df75bf88d7b2b502376d.tar.gz
emacs: Handle autoloading Emacs packages installed with Guix.
* emacs/guix-emacs.el: New file. * emacs.am (ELFILES): Add it. * emacs/guix-backend.el (guix-after-repl-operation-hook): Add 'guix-emacs-load-autoloads-maybe'. * emacs/guix-init.el.in: Autoload emacs packages. (guix-package-enable-at-startup): New variable.
Diffstat (limited to 'emacs/guix-init.el.in')
-rw-r--r--emacs/guix-init.el.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/guix-init.el.in b/emacs/guix-init.el.in
index 775c90fef9..4e40d7171a 100644
--- a/emacs/guix-init.el.in
+++ b/emacs/guix-init.el.in
@@ -1,7 +1,21 @@
(require 'guix-autoloads)
+(require 'guix-emacs)
(defvar guix-load-path
(replace-regexp-in-string "${prefix}" "@prefix@" "@emacsuidir@")
"Directory with scheme files for \"guix.el\" package.")
+(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-init' file to
+avoid loading autoloads of Emacs packages installed in
+`guix-user-profile'."
+ :type 'boolean
+ :group 'guix)
+
+(add-to-list 'load-path (guix-emacs-directory))
+
+(when guix-package-enable-at-startup
+ (guix-emacs-load-autoloads 'all))
+
(provide 'guix-init)