guix/emacs/guix-init.el.in
Alex Kost 7741139080 emacs: Find autoloads in "guix.d" subdirectories.
Co-authored-by: Federico Beffa <beffa@fbengineering.ch>.

* emacs/guix-emacs.el (guix-emacs-find-autoloads-in-directory,
  guix-emacs-subdirs): New functions.
  (guix-emacs-find-autoloads): Search for autoloads in "guix.d"
  subdirectories.
  (guix-emacs-load-autoloads): Add subdirectories to 'load-path'.
* emacs/guix-init.el.in: Do not add guix emacs directory to 'load-path'
  because it will be done by 'guix-emacs-load-autoloads'.  Move
  requiring 'guix-emacs' from the top-level to a clause for checking for
  'guix-package-enable-at-startup'.
2015-07-11 18:21:35 +03:00

20 lines
580 B
EmacsLisp

(require 'guix-autoloads)
(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)
(when guix-package-enable-at-startup
(require 'guix-emacs)
(guix-emacs-load-autoloads 'all))
(provide 'guix-init)