Archived
1
0
Fork 0

setup flyweel with hunspell globally (spell checking)

This commit is contained in:
KemoNine 2022-08-25 14:03:48 -04:00
parent 6be2464ac7
commit 0f9321008e
2 changed files with 39 additions and 35 deletions

View file

@ -22,4 +22,6 @@ fi
cat ~/.emacs-profiles.el cat ~/.emacs-profiles.el
echo "run emacs with each profile in '~/.emacs-profiles.el'" echo "run emacs with each profile in '~/.emacs-profiles.el'"
echo "install multimarkdown (windows bin release + add to emacs path like sqlite3)" echo "install multimarkdown (windows bin release + add to emacs path like sqlite3)"
echo "pacman -Ss mingw-w64-x86_64-{emacs,emacs-pdf-tools-server,imagemagick} in msys2" echo "pacman -S mingw-w64-x86_64-{emacs,emacs-pdf-tools-server,imagemagick} in msys2"
echo "pacman -S mingw-w64-x86_64-texlive-full in msys2"
echo "pacman -S mingw-w64-x86_64-aspell mingw-w64-x86_64-hunspell mingw-w64-x86_64-hunspell-en in msys2"

View file

@ -395,38 +395,40 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; flyspell ; flyspell
;(require 'flyspell) (require 'flyspell)
;(setenv "LANG" "en_US") (setenv "LANG" "en_US")
;(setenv "DICPATH" "~/.emacs.d.profiles/common/dictionaries") ; https://github.com/wooorm/dictionaries ;(setenv "DICPATH" "~/.emacs.d.profiles/common/dictionaries") ; https://github.com/wooorm/dictionaries
;(setq ispell-program-name "hunspell") (setq ispell-program-name "hunspell")
;(setq ispell-dictionary "en") (setq ispell-dictionary "en_US")
;
;(defun flyspell-on-for-buffer-type () (global-set-key (kbd "C-c y") 'flyspell-toggle )
; "Enable Flyspell appropriately for the major mode of the current buffer. Uses `flyspell-prog-mode' for modes derived from `prog-mode', so only strings and comments get checked. All other buffers get `flyspell-mode' to check all text. If flyspell is already enabled, does nothing."
; (interactive) (defun flyspell-on-for-buffer-type ()
; (if (not (symbol-value flyspell-mode)) ; if not already on "Enable Flyspell appropriately for the major mode of the current buffer. Uses `flyspell-prog-mode' for modes derived from `prog-mode', so only strings and comments get checked. All other buffers get `flyspell-mode' to check all text. If flyspell is already enabled, does nothing."
; (progn (interactive)
; (if (derived-mode-p 'prog-mode) (if (not (symbol-value flyspell-mode)) ; if not already on
; (progn (progn
; (message "Flyspell on (code)") (if (derived-mode-p 'prog-mode)
; (flyspell-prog-mode)) (progn
; ;; else (message "Flyspell on (code)")
; (progn (flyspell-prog-mode))
; (message "Flyspell on (text)") ;; else
; (flyspell-mode 1))) (progn
; ;; I tried putting (flyspell-buffer) here but it didn't seem to work (message "Flyspell on (text)")
; ))) (flyspell-mode 1)))
; ;; I tried putting (flyspell-buffer) here but it didn't seem to work
; (defun flyspell-toggle () )))
; "Turn Flyspell on if it is off, or off if it is on. When turning on, it uses `flyspell-on-for-buffer-type' so code-vs-text is handled appropriately."
; (interactive) (defun flyspell-toggle ()
; (if (symbol-value flyspell-mode) "Turn Flyspell on if it is off, or off if it is on. When turning on, it uses `flyspell-on-for-buffer-type' so code-vs-text is handled appropriately."
; (progn ; flyspell is on, turn it off (interactive)
; (message "Flyspell off") (if (symbol-value flyspell-mode)
; (flyspell-mode -1)) (progn ; flyspell is on, turn it off
; ; else - flyspell is off, turn it on (message "Flyspell off")
; (flyspell-on-for-buffer-type))) (flyspell-mode -1))
; ; else - flyspell is off, turn it on
;(add-hook 'find-file-hook 'flyspell-on-for-buffer-type) (flyspell-on-for-buffer-type)))
;(add-hook 'text-mode-hook 'flyspell-on-for-buffer-type)
;(add-hook 'after-change-major-mode-hook 'flyspell-on-for-buffer-type) (add-hook 'find-file-hook 'flyspell-on-for-buffer-type)
(add-hook 'text-mode-hook 'flyspell-on-for-buffer-type)
(add-hook 'after-change-major-mode-hook 'flyspell-on-for-buffer-type)