From b3965ea473d24b868e0223230f49af00b42e8fcf Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 10 Nov 2021 21:32:14 -0800 Subject: [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. --- oni-core.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 ;; 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) -- cgit v1.2.3-54-g00ecf