summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-04-12 13:17:30 -0500
committerCase Duckworth2022-04-12 13:17:30 -0500
commita6db4c22952560d4d937fb69734361c7f9b959ee (patch)
treef3a3c740ea948a8a1d8128b26943a84a678465a4
parentAdd dlet to compat.el (diff)
downloademacs-a6db4c22952560d4d937fb69734361c7f9b959ee.tar.gz
emacs-a6db4c22952560d4d937fb69734361c7f9b959ee.zip
Change auto-fill rules
-rw-r--r--init.el24
1 files changed, 11 insertions, 13 deletions
diff --git a/init.el b/init.el index 96fa0ac..61b20d7 100644 --- a/init.el +++ b/init.el
@@ -40,18 +40,18 @@
40 "C-x C-o" #'+open-paragraph 40 "C-x C-o" #'+open-paragraph
41 "C-w" #'+kill-word-backward-or-region 41 "C-w" #'+kill-word-backward-or-region
42 "C-x C-m" #'execute-extended-command ; original: coding systems 42 "C-x C-m" #'execute-extended-command ; original: coding systems
43 ;; "C-x C-1" #'delete-other-windows 43 ;; Alright, Yegge... NOPE! C-x t is tab prefix ... (maybe F6 or something?)
44 ;; "C-x 2" #'+split-window-below-then 44 ;; "C-x t" #'beginning-of-buffer
45 ;; "C-x C-2" #'+split-window-below-then 45 ;; "C-x e" #'end-of-buffer
46 ;; "C-x 3" #'+split-window-right-then
47 ;; "C-x C-3" #'+split-window-right-then
48 ) 46 )
49 ;; Font-lock keywords
50 (add-hook 'prog-mode-hook #'font-lock-todo-insinuate)
51 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults 47 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
52 (global-set-key (kbd "C-h") 'delete-backward-char) 48 (global-set-key (kbd "C-h") 'delete-backward-char)
53 (keyboard-translate ?\C-h ?\C-?) 49 (keyboard-translate ?\C-h ?\C-?)
54 ;; Hooks 50 ;; Hooks
51 (add-hook 'prog-mode-hook #'turn-on-auto-fill)
52 (add-hook 'prog-mode-hook #'font-lock-todo-insinuate)
53 (add-hook 'text-mode-hook #'turn-on-auto-fill)
54 (add-hook 'special-mode-hook #'turn-off-auto-fill)
55 ;; Advice 55 ;; Advice
56 ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hph14un/ 56 ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hph14un/
57 (define-advice keyboard-escape-quit (:around (fn &rest r)) 57 (define-advice keyboard-escape-quit (:around (fn &rest r))
@@ -605,7 +605,9 @@
605 "~" #'+org-insert-backtick) 605 "~" #'+org-insert-backtick)
606 (:global [f8] #'org-clock-in 606 (:global [f8] #'org-clock-in
607 [f9] #'org-clock-out) 607 [f9] #'org-clock-out)
608 (:hook #'variable-pitch-mode) 608 (:hook #'variable-pitch-mode
609 #'turn-off-auto-fill
610 #'org-indent-mode)
609 (:local-hook user-save-hook #'+org-before-save@prettify-buffer) 611 (:local-hook user-save-hook #'+org-before-save@prettify-buffer)
610 (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) 612 (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char)
611 ;; (define-advice org-open-at-point (:around (fn &rest r) open-external) 613 ;; (define-advice org-open-at-point (:around (fn &rest r) open-external)
@@ -744,8 +746,7 @@
744 746
745(setup prog 747(setup prog
746 (:local-set comment-auto-fill-only-comments t) 748 (:local-set comment-auto-fill-only-comments t)
747 (:hook #'prettify-symbols-mode 749 (:hook #'prettify-symbols-mode))
748 #'turn-on-auto-fill))
749 750
750(setup scratch 751(setup scratch
751 (:require +scratch) 752 (:require +scratch)
@@ -795,9 +796,6 @@
795 (tab-bar-mode +1) 796 (tab-bar-mode +1)
796 (display-time-mode +1)) 797 (display-time-mode +1))
797 798
798(setup text
799 (:hook #'turn-on-auto-fill))
800
801(setup timer-list 799(setup timer-list
802 (:hook #'hl-line-mode 800 (:hook #'hl-line-mode
803 #'lin-mode)) 801 #'lin-mode))