about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-08-26 23:30:15 -0500
committerCase Duckworth2021-08-26 23:30:15 -0500
commit82458ead46b7752ef615829986ef0044e7b03bd5 (patch)
treebb82d3016796002164376848a338310bb682f05e
parentAdd after-make-frame@setup to server-after-make-frame-hook (diff)
downloademacs-82458ead46b7752ef615829986ef0044e7b03bd5.tar.gz
emacs-82458ead46b7752ef615829986ef0044e7b03bd5.zip
Add experimental (commented) :after advice for do-auto-fill
-rw-r--r--init.el16
1 files 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 @@
328 erc-button-url-regexp browse-url-button-regexp 328 erc-button-url-regexp browse-url-button-regexp
329 erc-common-server-suffixes '(("tilde.chat\\'" . "~") 329 erc-common-server-suffixes '(("tilde.chat\\'" . "~")
330 ("libera.chat\\'" . "LC")) 330 ("libera.chat\\'" . "LC"))
331 erc-default-server "irc.tilde.chat" ; fuck freenode. all my friends hate 331 erc-default-server "irc.tilde.chat"
332 ; freenode.
333 erc-fill-function #'erc-fill-static 332 erc-fill-function #'erc-fill-static
334 erc-fill-static-center 14 333 erc-fill-static-center 14
335 erc-format-nick-function #'erc-format-truncate-@nick 334 erc-format-nick-function #'erc-format-truncate-@nick
@@ -709,6 +708,19 @@ like a dumbass."
709 (add-hook 'prog-mode-hook 708 (add-hook 'prog-mode-hook
710 (defun prog-mode@auto-fill () 709 (defun prog-mode@auto-fill ()
711 (setq-local comment-auto-fill-only-comments t) 710 (setq-local comment-auto-fill-only-comments t)
711 ;; (advice-add 'do-auto-fill :after
712 ;; (defun auto-fill@set-comment-column (&rest _)
713 ;; (save-excursion
714 ;; (when (or (looking-back comment-start-skip)
715 ;; (progn (backward-word)
716 ;; (looking-back
717 ;; comment-start-skip)))
718 ;; (comment-set-column t)))))
719 ;; If the above advice is enabled, the below advice also needs to
720 ;; be set to make `comment-dwim' work... I think.
721 ;; (advice-add 'comment-dwim :before
722 ;; (defun comment-dwim@set-comment-column (&rest _)
723 ;; (setq comment-column 0)))
712 (turn-on-auto-fill))) 724 (turn-on-auto-fill)))
713 725
714 (:option show-paren-delay 0 726 (:option show-paren-delay 0