Skip to content

Commit 627c517

Browse files
committed
eval-after-load & ensure program exists for ispell
Suggested by Ircg [1], taken from a patch to technomancy's starter kit. Might want to add a direct call to `turn-on-flyspell' after the add-hook inside the `when' to address Ircg's problem in issue 63. [1] eschulte#63
1 parent 87456bb commit 627c517

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

starter-kit-misc.org

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ ido-mode is like magic pixie dust!
9090
(set-default 'indent-tabs-mode nil)
9191
(set-default 'indicate-empty-lines t)
9292
(set-default 'imenu-auto-rescan t)
93-
93+
9494
(add-hook 'text-mode-hook 'turn-on-auto-fill)
95-
(add-hook 'text-mode-hook 'turn-on-flyspell)
96-
95+
(eval-after-load "ispell"
96+
'(when (executable-find ispell-program-name)
97+
(add-hook 'text-mode-hook 'turn-on-flyspell)))
98+
9799
(defvar starter-kit-coding-hook nil
98100
"Hook that gets run on activation of any programming mode.")
99-
101+
100102
(defalias 'yes-or-no-p 'y-or-n-p)
101103
;; Seed the random-number generator
102104
(random t)

0 commit comments

Comments
 (0)