diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-05-29 23:38:12 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-05-29 23:38:12 +0200 |
commit | 4fb5d4159586e84b8c062d1734d2041a8175b8b5 (patch) | |
tree | e60397e2bffb42cdee1d954bd6d8a9c6f0301700 /.config/emacs | |
parent | a83a65fe567d92911223ed6eb4ea6411573d9f32 (diff) |
emacs: Configure comments in mhtml mode
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/modules/mm-editing.el | 10 |
1 files changed, 7 insertions, 3 deletions
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 |