blob: 3d8c9fdaf762d192cd7bf6d9f4f70cbeb8879f92 (
plain) (
blame)
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
|
;;; my-text.el --- configures modes related to text -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(require 'flyspell)
(setq ispell-dictionary "en_US"
ispell-program-name "aspell"
ispell-extra-args '("--camel-case"))
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
(require 'markdown-mode)
(setq markdown-fontify-code-blocks-natively t)
(when (executable-find "pandoc")
(setq markdown-command "pandoc -f markdown -t html"))
(require 'dabbrev)
(require 'abbrev)
(let ((map global-map))
(define-key map (kbd "M-/") #'dabbrev-expand)
(define-key map (kbd "C-x M-/") #'dabbrev-completion))
(setq only-global-abbrevs nil)
(let ((table text-mode-abbrev-table))
(define-abbrev table "github" "GitHub")
(define-abbrev table "emacs" "Emacs"))
(dolist (hook '(text-mode-hook git-commit-mode-hook))
(add-hook hook #'abbrev-mode))
(provide 'my-text)
;;; my-text.el ends here
|