From a6db4c22952560d4d937fb69734361c7f9b959ee Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 12 Apr 2022 13:17:30 -0500 Subject: Change auto-fill rules --- init.el | 24 +++++++++++------------- 1 file 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 @@ "C-x C-o" #'+open-paragraph "C-w" #'+kill-word-backward-or-region "C-x C-m" #'execute-extended-command ; original: coding systems - ;; "C-x C-1" #'delete-other-windows - ;; "C-x 2" #'+split-window-below-then - ;; "C-x C-2" #'+split-window-below-then - ;; "C-x 3" #'+split-window-right-then - ;; "C-x C-3" #'+split-window-right-then + ;; Alright, Yegge... NOPE! C-x t is tab prefix ... (maybe F6 or something?) + ;; "C-x t" #'beginning-of-buffer + ;; "C-x e" #'end-of-buffer ) - ;; Font-lock keywords - (add-hook 'prog-mode-hook #'font-lock-todo-insinuate) ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults (global-set-key (kbd "C-h") 'delete-backward-char) (keyboard-translate ?\C-h ?\C-?) ;; Hooks + (add-hook 'prog-mode-hook #'turn-on-auto-fill) + (add-hook 'prog-mode-hook #'font-lock-todo-insinuate) + (add-hook 'text-mode-hook #'turn-on-auto-fill) + (add-hook 'special-mode-hook #'turn-off-auto-fill) ;; Advice ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hph14un/ (define-advice keyboard-escape-quit (:around (fn &rest r)) @@ -605,7 +605,9 @@ "~" #'+org-insert-backtick) (:global [f8] #'org-clock-in [f9] #'org-clock-out) - (:hook #'variable-pitch-mode) + (:hook #'variable-pitch-mode + #'turn-off-auto-fill + #'org-indent-mode) (:local-hook user-save-hook #'+org-before-save@prettify-buffer) (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) ;; (define-advice org-open-at-point (:around (fn &rest r) open-external) @@ -744,8 +746,7 @@ (setup prog (:local-set comment-auto-fill-only-comments t) - (:hook #'prettify-symbols-mode - #'turn-on-auto-fill)) + (:hook #'prettify-symbols-mode)) (setup scratch (:require +scratch) @@ -795,9 +796,6 @@ (tab-bar-mode +1) (display-time-mode +1)) -(setup text - (:hook #'turn-on-auto-fill)) - (setup timer-list (:hook #'hl-line-mode #'lin-mode)) -- cgit 1.4.1-21-gabe81