summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-20 18:53:22 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-20 18:53:22 -0700
commit4e9ea9b3e3039de66d8e63f6c74646a092d73b8d (patch)
tree2d75cd3487d69d8c031fa37a2faf21b574b3b001 /emacs
parentremove the need for `use-package' in my-settings.el (diff)
downloademacs.d-4e9ea9b3e3039de66d8e63f6c74646a092d73b8d.tar.gz
text: configure (d)abbrev modes
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-text.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/custom/my-text.el b/emacs/custom/my-text.el
index c926be3..3d8c9fd 100644
--- a/emacs/custom/my-text.el
+++ b/emacs/custom/my-text.el
@@ -16,6 +16,20 @@
 (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