diff options
| author | tslil clingman <> | 2020-04-13 14:40:38 -0700 |
|---|---|---|
| committer | tslil clingman <> | 2020-04-13 14:40:38 -0700 |
| commit | 24648353e3e2e63e4683aa7021deb87539d6d047 (patch) | |
| tree | 6521e557b0b546fc1197386fdac836bf2ab3c2bf /emacs/inits/23-text-related.el | |
| parent | 9f16845044caa0a11f8de97b797bcd753578916f (diff) | |
flyspell->spell-fu and finally fixed exwm last workspace
Diffstat (limited to 'emacs/inits/23-text-related.el')
| -rw-r--r-- | emacs/inits/23-text-related.el | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/emacs/inits/23-text-related.el b/emacs/inits/23-text-related.el index 0efdc95..75eb869 100644 --- a/emacs/inits/23-text-related.el +++ b/emacs/inits/23-text-related.el @@ -1,53 +1,24 @@ -;; Time-stamp: <2020-03-04 21:49:11 (tslil@bison)> +;; Time-stamp: <2020-04-13 14:36:53 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; Spelling -(defun flyspell-correct-selectrum (candidates word) - (let* ((save "[SAVE]") - (accept-session "[ACCEPT (session)]") - (accept-buffer "[ACCEPT (buffer)]") - (skip "[SKIP]") - (selectrucm-should-sort nil) - (result (selectrum-completing-read - (format "Correcting '%s': " word) - (append candidates - (list save accept-session accept-buffer skip))))) - (cond - ((string= result save) - (cons 'save word)) - ((string= result accept-session) - (cons 'session word)) - ((string= result accept-buffer) - (cons 'buffer word)) - ((string= result skip) - (cons 'skip word)) - (t - result)))) - -(use-package flyspell-correct +(use-package spell-fu :ensure t - :defer t :config - (setq flyspell-correct-interface #'flyspell-correct-selectrum)) - -(use-package flyspell - :ensure t - :bind (:map flyspell-mode-map - ("M-$" . flyspell-correct-wrapper) - ("C-," . nil) - ("C-." . nil) - ("C-\"" . nil)) - :init (setq ispell-dictionary "british" - flyspell-default-dictionary "british")) + ispell-personal-dictionary "~/.aspell.en.pws") + + ;; The default was this "\\b\\([[:alpha:]][[:alpha:]']*\\)\\b", but that + ;; didn't play well with ``LaTeX's quoting system''. + (setq-default spell-fu-word-regexp "\\([[:alpha:]]+\\('[[:alpha:]]\\)*\\)")) (setq sentence-end-double-space nil) (add-hook 'mail-mode-hook (lambda () (electric-pair-local-mode 1) (turn-on-auto-fill) - (flyspell-mode 1) + (spell-fu-mode 1) (company-mode 1))) (add-hook 'text-mode-hook (lambda () @@ -56,7 +27,8 @@ (electric-pair-local-mode 1) (turn-on-auto-fill) (siege-mode 1) - (flyspell-mode 1))) + (spell-fu-mode 1) + )) (use-package dictionary :ensure t :defer t) |
