summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-27 17:50:16 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-27 17:50:16 -0700
commitd7097d211698cd9b7571ec952e04446d799faaac (patch)
treefab000f9427eee32ef6079bc3fcbd7cc37b6f85f
parentmy-conf: binding to format JSON buffers (diff)
downloademacs.d-d7097d211698cd9b7571ec952e04446d799faaac.tar.gz
my-test: more simplification
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-text.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/emacs/custom/my-text.el b/emacs/custom/my-text.el
index bf53f26..86db788 100644
--- a/emacs/custom/my-text.el
+++ b/emacs/custom/my-text.el
@@ -9,25 +9,26 @@
 (customize-set-variable 'ispell-extra-args '("--camel-case"))
 
 (add-hook 'text-mode-hook 'flyspell-mode)
-(add-hook 'prog-mode-hook 'flyspell-prog-mode)
+(dolist (hook '(prog-mode-hook conf-mode-hook))
+  (add-hook hook 'flyspell-prog-mode))
 
 (customize-set-variable 'markdown-fontify-code-block-natively t)
 (when (executable-find "pandoc")
   (customize-set-variable '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))
+(eval-after-load 'dabbrev
+  (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"))
+(eval-after-load 'abbrev
+  (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))
+  (add-hook hook 'abbrev-mode))
 
 (provide 'my-text)