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.
This commit is contained in:
William Carroll 2020-09-02 14:49:10 +01:00
parent 71e57700d6
commit 924c7fa419
4 changed files with 36 additions and 5 deletions

View file

@ -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)