Only attempt to spellcheck if spellchecker is found.
This commit is contained in:
parent
5c96c59867
commit
2a747731a1
37
init.el
37
init.el
|
@ -1,5 +1,5 @@
|
|||
;;; init.el --- tastytea's Emacs init file.
|
||||
;;; Time-stamp: <2019-03-23 05:57:53 CET>
|
||||
;;; Time-stamp: <2019-03-23 06:06:13 CET>
|
||||
|
||||
;;; Commentary:
|
||||
;;; I am using this file with Emacs 26, but most of it will probably work with
|
||||
|
@ -493,23 +493,24 @@
|
|||
(whitespace-space ((nil :foreground "gray18"))))
|
||||
|
||||
;; Spell checking.
|
||||
(unless slow-computer
|
||||
(use-package flyspell
|
||||
:custom
|
||||
(ispell-dictionary "english")
|
||||
:config
|
||||
(defun my/toggle-flyspell ()
|
||||
"Toggle flyspell-mode and run flyspell-buffer after activating."
|
||||
(interactive)
|
||||
(if (bound-and-true-p flyspell-mode)
|
||||
(flyspell-mode 0)
|
||||
(flyspell-mode)
|
||||
(flyspell-buffer)))
|
||||
:bind
|
||||
("<f6>" . my/toggle-flyspell)
|
||||
:hook
|
||||
;; Spellcheck comments.
|
||||
(prog-mode . flyspell-prog-mode)))
|
||||
(if (executable-find "aspell")
|
||||
(unless slow-computer
|
||||
(use-package flyspell
|
||||
:custom
|
||||
(ispell-dictionary "english")
|
||||
:config
|
||||
(defun my/toggle-flyspell ()
|
||||
"Toggle flyspell-mode and run flyspell-buffer after activating."
|
||||
(interactive)
|
||||
(if (bound-and-true-p flyspell-mode)
|
||||
(flyspell-mode 0)
|
||||
(flyspell-mode)
|
||||
(flyspell-buffer)))
|
||||
:bind
|
||||
("<f6>" . my/toggle-flyspell)
|
||||
:hook
|
||||
;; Spellcheck comments.
|
||||
(prog-mode . flyspell-prog-mode))))
|
||||
|
||||
;; Multiple cursors.
|
||||
(use-package multiple-cursors
|
||||
|
|
Loading…
Reference in New Issue