diff options
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/modules/mm-editing.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el index 6fbb44f..1b75649 100644 --- a/.config/emacs/modules/mm-editing.el +++ b/.config/emacs/modules/mm-editing.el @@ -118,15 +118,20 @@ those should be listed in `mm-editing-indentation-settings'." (set (make-local-variable extra) tabsize))))) -;;; Make Tab Not Suck +;;; Code Commenting -(use-package indent - :custom - (tab-always-indent t)) +(defun mm-c-comment-no-leading-stars () + (setq-local comment-continue " ")) -(use-package electric +(use-package newcomment + :custom + (comment-style 'multi-line) :config - (setq-default electric-indent-inhibit t)) + (dolist (mode '(c-mode c++-mode)) + (add-hook (mm-mode-to-hook mode) #'mm-c-comment-no-leading-stars) + (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)))) ;;; Multiple Cursors |