Emacs/Guix: Move to .emacs.d/lisp/init-guix.el

master
Pierre Neidhardt 2018-07-24 09:41:31 +02:00
parent 62843a3f64
commit 0e30208243
2 changed files with 33 additions and 21 deletions

View File

@ -187,27 +187,7 @@
;;; Guix
(when (executable-find "guix")
(nconc package-selected-packages '(guix))
(with-eval-after-load 'geiser-guile
(when (require 'yasnippet nil t)
(yas-global-mode 1)
(with-eval-after-load 'yasnippet
(add-to-list 'yas-snippet-dirs (expand-file-name "etc/snippets" "~/projects/guix"))))
;; REVIEW: This is suggested in the manual but it does not seem to work.
;; (add-to-list 'geiser-guile-load-path "~/projects/guix")
)
;; To use package declaration from the local checkout:
;; (setq guix-load-path "~/projects/guix")
(defun ambrevar/init-guix ()
(and buffer-file-name
(string-match "\\<guix\\>" buffer-file-name)
(guix-devel-mode)))
(add-hook 'scheme-mode-hook 'ambrevar/init-guix)
(defun ambrevar/guix-debbugs-gnu (&optional severities packages archivedp suppress tags)
(interactive)
(let ((debbugs-gnu-default-packages '("guix-patches")))
(if (called-interactively-p)
(call-interactively 'debbugs-gnu)
(debbugs-gnu severities packages archivedp suppress tags)))))
(require 'init-guix))
;;; Helm
(nconc package-selected-packages '(helm helm-descbinds helm-ls-git))

View File

@ -0,0 +1,32 @@
(defvar ambrevar/guix-checkout-directory (expand-file-name "~/projects/guix"))
(with-eval-after-load 'geiser-guile
(when (require 'yasnippet nil t)
;; (yas-global-mode 1)
(add-hook 'scheme-mode-hook 'yas-minor-mode)
(with-eval-after-load 'yasnippet
(add-to-list 'yas-snippet-dirs
(expand-file-name "etc/snippets"
ambrevar/guix-checkout-directory))))
;; REVIEW: This is suggested in the manual but it does not seem to work.
;; (add-to-list 'geiser-guile-load-path ambrevar/guix-checkout-directory)
)
;; To use package declaration from the local checkout:
;; (setq guix-load-path ambrevar/guix-checkout-directory)
(defun ambrevar/init-guix ()
(and buffer-file-name
(string-match "\\<guix\\>" buffer-file-name)
(guix-devel-mode)))
(add-hook 'scheme-mode-hook 'ambrevar/init-guix)
(defun ambrevar/guix-debbugs-gnu (&optional severities packages archivedp suppress tags)
"Like `debbugs-gnu' but for the Guix project."
(interactive)
(let ((debbugs-gnu-default-packages '("guix-patches")))
(if (called-interactively-p)
(call-interactively 'debbugs-gnu)
(debbugs-gnu severities packages archivedp suppress tags))))
(provide 'init-guix)