aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-11-10 21:32:14 -0800
committerGravatar Tom Willemse2021-11-10 21:32:14 -0800
commitb3965ea473d24b868e0223230f49af00b42e8fcf (patch)
treef251feea274cb4b07c166543257fe02f52dbddef
parenta0bd2014f36884fee71275b771bcb3ce6e068de6 (diff)
downloademacs-config-b3965ea473d24b868e0223230f49af00b42e8fcf.tar.gz
emacs-config-b3965ea473d24b868e0223230f49af00b42e8fcf.zip
[oni-core] Add settings for spell checking
- Inhibit the use of the ’ character in case a ' should be used so that spell checking programs don't get confused. - Explicitly use the ‘hunspell’ program to perform spell checking.
-rw-r--r--oni-core.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/oni-core.el b/oni-core.el
index 795dd39..34ce8e2 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
-;; Version: 2021.0921.232841
+;; Version: 2021.1110.213201
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard mixed-pitch)
;; This program is free software; you can redistribute it and/or modify
@@ -293,6 +293,20 @@ _s_: String list"
;; I’m used to working with Monday as the starting day.
(setq calendar-week-start-day 1))
+(defun oni-core-in-word-p ()
+ "Check whether the character just typed was part of a word."
+ (save-excursion
+ (backward-char)
+ (looking-back (rx word) (1- (point)))))
+
+(with-eval-after-load 'electric
+ (add-hook 'electric-quote-inhibit-functions #'oni-core-in-word-p))
+
+(eval-when-compile (require 'ispell))
+(with-eval-after-load 'ispell
+ (setq ispell-program-name "hunspell"
+ ispell-really-hunspell t))
+
;; Enable any modes that I want to have turned on right away.
(electric-indent-mode -1)