aboutsummaryrefslogtreecommitdiff
path: root/emacs-init.el
diff options
context:
space:
mode:
authorTimo Wilken2022-12-10 23:49:45 +0100
committerTimo Wilken2022-12-10 23:49:45 +0100
commit7048868fcde3952ff7cc3d69482ad2d434c90600 (patch)
tree4a248f66d70f525fb980b08b363b6c334a6a0c07 /emacs-init.el
parent3b62419d72b0d831277341b71b1d9f455c2b58c5 (diff)
Work around Guix macros being indented wrong
Diffstat (limited to 'emacs-init.el')
-rw-r--r--emacs-init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs-init.el b/emacs-init.el
index 6c32129f..fea3d4e1 100644
--- a/emacs-init.el
+++ b/emacs-init.el
@@ -509,6 +509,14 @@
(add-hook 'emacs-lisp-mode-hook #'tw/emacs-lisp-evil-setup)
+(defun tw/hack-guile-indents ()
+ "Set the proper `scheme-indent-function' for Guix macros."
+ (put 'modify-phases 'scheme-indent-function 1)
+ (put 'add-before 'scheme-indent-function 2)
+ (put 'substitute* 'scheme-indent-function 1))
+
+(add-hook 'scheme-mode-hook #'tw/hack-guile-indents)
+
(evil-define-key '(normal visual) emacs-lisp-mode-map
(kbd "<localleader>eb") #'eval-buffer
(kbd "<localleader>ef") #'eval-defun