From 4fb5d4159586e84b8c062d1734d2041a8175b8b5 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 29 May 2025 23:38:12 +0200 Subject: emacs: Configure comments in mhtml mode --- .config/emacs/modules/mm-editing.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.config/emacs/modules') diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el index dda5352..0506b65 100644 --- a/.config/emacs/modules/mm-editing.el +++ b/.config/emacs/modules/mm-editing.el @@ -125,18 +125,22 @@ those should be listed in `mm-editing-indentation-settings'." ;;; Code Commenting -(defun mm-c-comment-no-leading-stars () +(defun mm-c-comment-no-continue () (setq-local comment-continue " ")) +(defun mm-mhtml-comment-no-continue () + (setq-local comment-continue " ")) + (use-package newcomment :custom (comment-style 'multi-line) :config (dolist (mode '(c-mode c++-mode)) - (add-hook (mm-mode-to-hook mode) #'mm-c-comment-no-leading-stars) + (add-hook (mm-mode-to-hook mode) #'mm-c-comment-no-continue) (when-let ((ts-mode (mm-mode-to-ts-mode mode)) ((fboundp ts-mode))) - (add-hook (mm-mode-to-hook ts-mode) #'mm-c-comment-no-leading-stars)))) + (add-hook (mm-mode-to-hook ts-mode) #'mm-c-comment-no-leading-stars))) + (add-hook 'mhtml-mode #'mm-mhtml-comment-no-continue)) ;;; Multiple Cursors -- cgit v1.2.3