From f2c88f5df8fda10de7f28e8ac3de9ecdeb964d77 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 15 Mar 2018 01:16:19 -0400 Subject: [PATCH] Switch some hooks to using use-package's :hook feature --- .emacs.d/init.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4e0c1df..ac94ca2 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -127,8 +127,7 @@ (use-package semantic :defer - :init - (add-hook 'c-mode-hook 'semantic-mode) + :hook c-mode :config (setq semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode @@ -383,7 +382,7 @@ (use-package column-enforce-mode :ensure :config - (add-hook 'prog-mode-hook 'column-enforce-mode)) + :hook prog-mode) (use-package show-marks :ensure :config @@ -554,14 +553,13 @@ (use-package highlight-indent-guides :config - (add-hook 'prog-mode-hook 'highlight-indent-guides-mode)) + :hook (prog-mode . highlight-indent-guides-mode)) (use-package helm-dash :config (setq helm-dash-browser-func 'eww helm-dash-enable-debugging nil) - (add-hook 'python-mode-hook - '(lambda ()(setq-local helm-dash-docsets '("Python 3"))))) + :hook (python-mode . (lambda ()(setq-local helm-dash-docsets '("Python 3"))))) (use-package pkgbuild-mode :config @@ -611,7 +609,7 @@ :config (add-to-list 'company-backends 'company-tern) (setq company-tern-property-marker "⚫") - (add-hook 'js2-mode-hook (lambda () (tern-mode t)))) + :hook (js2-mode . tern-mode)) (use-package nm :bind (:map nm-mode-map