about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/wpc-rust.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·49+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-02T13·49+0100
commit924c7fa4199235a929ecd6a68a09b7e4acd36352 (patch)
treecf18d000d70f2f3c1eb97d30a5d1f65686d0ca05 /emacs/.emacs.d/wpc/wpc-rust.el
parent71e57700d60a2573fca069dfa8fc90e928561dcf (diff)
Debug undefined add-hook-before-save
`use-package` complains that `add-hook-before-save` doesn't exist. This is
because it's now named `macros-add-hook-before-save`.

This fixes that.
Diffstat (limited to 'emacs/.emacs.d/wpc/wpc-rust.el')
-rw-r--r--emacs/.emacs.d/wpc/wpc-rust.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-rust.el b/emacs/.emacs.d/wpc/wpc-rust.el
index f15c3d3c6b5b..396d6349ae6a 100644
--- a/emacs/.emacs.d/wpc/wpc-rust.el
+++ b/emacs/.emacs.d/wpc/wpc-rust.el
@@ -13,8 +13,18 @@
 ;; - `rustup component add rust-src`
 ;; - `rustup toolchain add nightly && cargo +nightly install racer`
 
-
 ;;; Code:
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Dependencies
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(require 'macros)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Configuration
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (use-package racer
   :config
   (setq rust-sysroot (->> "~/.cargo/bin/rustc --print sysroot"
@@ -26,7 +36,7 @@
 (use-package rust-mode
   :config
   (add-hook 'rust-mode-hook #'racer-mode)
-  (add-hook-before-save 'rust-mode-hook #'rust-format-buffer)
+  (macros-add-hook-before-save 'rust-mode-hook #'rust-format-buffer)
   (define-key rust-mode-map
     (kbd "TAB")
     #'company-indent-or-complete-common)