hooks.el 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. (when (functionp #'add-hooks)
  2. (add-hooks
  3. '(((dired-mode-hook) . toggle-truncate-lines)
  4. ((guix-devel-mode magit-revision-mode-hook) . goto-address-mode)
  5. ((geiser-repl-mode-hook shell-mode-hook)
  6. . (lambda ()
  7. (setq bidi-display-reordering nil)))
  8. ;; XXX: Breaks C-z in scheme-mode (run-geiser)
  9. ;; ((geiser-repl-mode-hook shell-mode-hook)
  10. ;; . (lambda ()
  11. ;; (font-lock-mode -1)))
  12. ((erc-mode-hook) . (lambda () (setq truncate-lines t))))))
  13. (when (functionp #'add-hooks)
  14. (when (functionp 'guix-prettify-mode)
  15. (add-hooks
  16. '(((diff-mode-hook dired-mode-hook proced-post-display-hook
  17. shell-mode-hook ibuffer-mode-hook guix-env-var-mode-hook)
  18. . guix-prettify-mode))))
  19. (when (functionp 'yas-minor-mode)
  20. (add-hooks '(((prog-mode-hook org-mode-hook text-mode-hook) . yas-minor-mode))))
  21. (when (boundp 'rainbow-delimiters-mode)
  22. (add-hooks '(((prog-mode-hook geiser-repl-mode-hook) . rainbow-delimiters-mode))))
  23. (when (functionp 'smartparens-strict-mode)
  24. (add-hooks '(((prog-mode-hook
  25. minibuffer-inactive-mode-hook
  26. geiser-repl-mode-hook
  27. git-commit-mode-hook
  28. org-mode-hook)
  29. . smartparens-strict-mode))))
  30. (when (functionp 'hs-minor-mode)
  31. (add-hooks '(((prog-mode-hook) . hs-minor-mode))))
  32. (when (functionp 'guix-devel-mode)
  33. (add-hooks '(((scheme-mode-hook) . guix-devel-mode)))))