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.
This commit is contained in:
parent
e4e2154644
commit
6d268e5281
|
@ -28,6 +28,14 @@
|
||||||
(unless (require 'guix-profiles nil t)
|
(unless (require 'guix-profiles nil t)
|
||||||
(defvar guix-user-profile (expand-file-name "~/.guix-profile")))
|
(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
|
(defcustom guix-emacs-activate-after-operation t
|
||||||
"Activate Emacs packages after installing.
|
"Activate Emacs packages after installing.
|
||||||
If nil, do not load autoloads of the Emacs packages after
|
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).
|
;; profile will not be loaded).
|
||||||
(guix-emacs-load-autoloads guix-current-profile)))
|
(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)
|
(provide 'guix-emacs)
|
||||||
|
|
||||||
;;; guix-emacs.el ends here
|
;;; guix-emacs.el ends here
|
||||||
|
|
|
@ -1,19 +1,6 @@
|
||||||
(require 'guix-autoloads)
|
(require 'guix-autoloads)
|
||||||
(require 'guix-emacs)
|
(require 'guix-emacs)
|
||||||
|
|
||||||
(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))
|
|
||||||
|
|
||||||
(add-hook 'scheme-mode-hook 'guix-devel-activate-mode-maybe)
|
(add-hook 'scheme-mode-hook 'guix-devel-activate-mode-maybe)
|
||||||
(add-hook 'shell-mode-hook 'guix-build-log-minor-mode-activate-maybe)
|
(add-hook 'shell-mode-hook 'guix-build-log-minor-mode-activate-maybe)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue