summaryrefslogtreecommitdiff
path: root/emacs/inits/23-text-related.el
blob: 79b4da7c6a3d64ddda425939403ddbc1bc0a28d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
;; Time-stamp: <2024-07-13 15h08 CEST (471b3659)>

;; -----------------------------------------------------------------------------
;; Spelling

(use-package spell-fu
  :ensure
  :defer
  :config
  (setq ispell-dictionary "en_GB-ise-w_accents"
        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:]]+\\)*\\)"
                spell-fu-faces-exclude '(font-latex-math-face
                                         font-latex-sedate-face
                                         font-lock-keyword-face
                                         font-lock-function-name-face
                                         font-lock-variable-name-face)))

(setq sentence-end-double-space nil)

(add-hook 'text-mode-hook (lambda ()
                            (subword-mode 1)
                            (electric-pair-local-mode 1)
                            (turn-on-auto-fill)
                            (siege-mode 1)
                            (spell-fu-mode 1)))

(use-package dictionary :ensure :defer)

;; -----------------------------------------------------------------------------
;; Markdown

(use-package markdown-mode
  :ensure
  :defer
  :hook (markdown-mode . (lambda ()
                           (auto-fill-mode -1)
                           (visual-line-mode))))

;; -----------------------------------------------------------------------------
;; Org

(use-package org
  :defer
  :bind (:map org-mode-map
              ("M-h" . nil))
  ;; :hook (org-mode . (lambda ()
  ;;                     (activate-input-method default-input-method)))
  :config
  (setq org-use-sub-superscripts (quote {})
        org-modules nil))