home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e427e513e8642b2ea501b1a59bee64a414edc466
parent e5fcf210981810c9cd412fd6aa2bc365ae15943d
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed, 19 Aug 2020 16:01:06 +0200

tools/emacs: fix :hook and -hook mistakeā€¦

use-package with :hook adds a `-hook` to the name provided. This
means, that if you want to add a function to `occur-mode-hook`, you
need to use `:hook ((occur-mode . my-func))` (without `-hook`)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-appearance.el | 2+-
Mtools/emacs/config/config-dired.el | 2+-
Mtools/emacs/config/config-navigating.el | 16++++++++--------
Mtools/emacs/config/config-org.el | 4++--
4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tools/emacs/config/config-appearance.el b/tools/emacs/config/config-appearance.el @@ -95,7 +95,7 @@ Ignores `ARGS'." (setq window-divider-default-right-width 1) (setq window-divider-default-bottom-width 1) (setq window-divider-default-places 'right-only) - :hook (after-init-hook . window-divider-mode)) + :hook (after-init . window-divider-mode)) ;; -UseWindowDivider ;; UseTabbar diff --git a/tools/emacs/config/config-dired.el b/tools/emacs/config/config-dired.el @@ -231,7 +231,7 @@ This relies on the external 'fd' executable." :commands (diredfl-mode) :config (setq diredfl-ignore-compressed-flag nil) - :hook (dired-mode-hook . diredfl-mode)) + :hook (dired-mode . diredfl-mode)) (use-package trashed :commands (trashed) diff --git a/tools/emacs/config/config-navigating.el b/tools/emacs/config/config-navigating.el @@ -65,9 +65,9 @@ Meant to economise on key bindings." (vde/occur-url) (vde/occur-browse-url-in-buffer))) - :hook ((occur-mode-hook . hl-line-mode) - (occur-mode-hook . (lambda () - (toggle-truncate-lines t)))) + :hook ((occur-mode . hl-line-mode) + (occur-mode . (lambda () + (toggle-truncate-lines t)))) :bind (("M-s u" . vde/occur-visit-or-list-urls) ("M-s M-o" . multi-occur) :map occur-mode-map @@ -139,11 +139,11 @@ aggressive fuzzy-style matching for this particular command." (icomplete-vertical-do (:height (/ (frame-height) 4)) (call-interactively 'imenu)))) - :hook ((imenu-after-jump-hook . (lambda () - (when (and (eq major-mode 'org-mode) - (org-at-heading-p)) - (org-show-entry) - (org-reveal t))))) + :hook ((imenu-after-jump . (lambda () + (when (and (eq major-mode 'org-mode) + (org-at-heading-p)) + (org-show-entry) + (org-reveal t))))) :bind ("C-'" . prot/imenu-vertical)) (use-package flimenu diff --git a/tools/emacs/config/config-org.el b/tools/emacs/config/config-org.el @@ -498,7 +498,7 @@ and thus keeping the configuration source up-to-date" (mapc (lambda (x) (org-babel-tangle-file x)) (ignore-errors (directory-files-recursively org-notes-dir "\.org$")))) - :hook ((kill-emacs-hook . vde/tangle-all-notes))) + :hook ((kill-emacs . vde/tangle-all-notes))) (use-package org-journal :commands (org-journal-new-entry org-capture) :after (org-capture) @@ -603,7 +603,7 @@ and thus keeping the configuration source up-to-date" (mapc (lambda (x) (org-babel-tangle-file x)) (ignore-errors (directory-files-recursively org-notes-dir "\.org$")))) - :hook ((kill-emacs-hook . vde/tangle-all-notes))) + :hook ((kill-emacs . vde/tangle-all-notes))) (use-package org :defer t