summaryrefslogtreecommitdiff
path: root/emacs/personal-lisp/general-text.el
blob: bea3fc983c2558c82a821b90c4c63b93807c4445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
;; General stuff for editing all text, but particularly prose

;; spelling
(require 'spell-fu)
(setq ispell-personal-dictionary "/home/tmu/.aspell.en.pws")
(add-hook 'text-mode-hook (lambda () (spell-fu-mode 1)))

;; dictionaries
(define-prefix-command 'dict-map)
(global-set-key (kbd "M-l") 'dict-map)
(define-keymap :full nil
  :parent nil
  :suppress nil
  :keymap nil
  :name "dict-map"
  :prefix 'dict-map
  (kbd "w") 'sdcv-search-input
  (kbd "c") (lambda () (interactive)
              (activate-input-method 'pyim)
              (sdcv-search-input (read-from-minibuffer "Chinese Word: "
                                                       nil nil nil
                                                       nil nil t))
              (activate-input-method nil)))