From 41a28cd6f4d9ef9c2e73f8adf4ea0d1d29687f27 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 29 Jan 2020 14:51:20 +0100 Subject: [PATCH] Improve syntax of the hooks --- .emacs.d/config.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.emacs.d/config.org b/.emacs.d/config.org index f6c6994..527c0d4 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -419,15 +419,15 @@ Irony requires M-x =irony-install-server=. (use-package rainbow-mode :defer t - :init (add-hook 'prog-mode-hook 'rainbow-mode)) + :hook (prog-mode . rainbow-mode)) (use-package rainbow-delimiters :defer t - :init (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)) + :hook (prog-mode . rainbow-delimiters-mode)) (use-package org-bullets :defer t - :init (add-hook 'org-mode-hook 'org-bullets-mode)) + :hook (org-mode . org-bullets-mode)) ;; Cmake syntax highlighting (use-package cmake-mode @@ -442,7 +442,7 @@ Irony requires M-x =irony-install-server=. :defer t :custom (column-enforce-comments nil) :custom-face (column-enforce-face ((t (:background "#373b41" :foreground "#de935f")))) - :init (add-hook 'prog-mode-hook 'column-enforce-mode)) + :hook (prog-mode . column-enforce-mode)) #+END_SRC Possible modern replacement for column-enforce-mode: