From 82458ead46b7752ef615829986ef0044e7b03bd5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 26 Aug 2021 23:30:15 -0500 Subject: Add experimental (commented) :after advice for do-auto-fill --- init.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index f040fc7..079e586 100644 --- a/init.el +++ b/init.el @@ -328,8 +328,7 @@ erc-button-url-regexp browse-url-button-regexp erc-common-server-suffixes '(("tilde.chat\\'" . "~") ("libera.chat\\'" . "LC")) - erc-default-server "irc.tilde.chat" ; fuck freenode. all my friends hate - ; freenode. + erc-default-server "irc.tilde.chat" erc-fill-function #'erc-fill-static erc-fill-static-center 14 erc-format-nick-function #'erc-format-truncate-@nick @@ -709,6 +708,19 @@ like a dumbass." (add-hook 'prog-mode-hook (defun prog-mode@auto-fill () (setq-local comment-auto-fill-only-comments t) + ;; (advice-add 'do-auto-fill :after + ;; (defun auto-fill@set-comment-column (&rest _) + ;; (save-excursion + ;; (when (or (looking-back comment-start-skip) + ;; (progn (backward-word) + ;; (looking-back + ;; comment-start-skip))) + ;; (comment-set-column t))))) + ;; If the above advice is enabled, the below advice also needs to + ;; be set to make `comment-dwim' work... I think. + ;; (advice-add 'comment-dwim :before + ;; (defun comment-dwim@set-comment-column (&rest _) + ;; (setq comment-column 0))) (turn-on-auto-fill))) (:option show-paren-delay 0 -- cgit 1.4.1-21-gabe81