Fix (hopefully) enabling flyspell automatically

This commit is contained in:
Evie Litherland-Smith 2023-11-02 16:56:50 +00:00
parent ce763e1687
commit 00df579c67

View file

@ -30,10 +30,9 @@
(keymap-set global-map "C-c p d" #'package-delete) (keymap-set global-map "C-c p d" #'package-delete)
;; turn on spell checking, if available. ;; turn on spell checking, if available.
(with-eval-after-load 'ispell (when (and (require 'ispell nil :noerror) (executable-find ispell-program-name))
(when (executable-find ispell-program-name) (add-hook 'text-mode-hook #'flyspell-mode)
(add-hook 'text-mode-hook #'flyspell-mode) (add-hook 'prog-mode-hook #'flyspell-prog-mode))
(add-hook 'prog-mode-hook #'flyspell-prog-mode)))
;; Make shebang (#!) file executable when saved ;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)