diff --git a/core/autoload/editor.el b/core/autoload/editor.el index fd2deb91a..51a2bfed6 100644 --- a/core/autoload/editor.el +++ b/core/autoload/editor.el @@ -274,7 +274,7 @@ Respects `require-final-newline'." ;; Advice ;;;###autoload -(defun doom*newline-and-indent (_orig-fn) +(defun doom*newline-indent-and-continue-comments (_orig-fn) "Inserts a newline and possibly indents it. Also continues comments if executed from a commented line; handling special cases for certain languages with weak native support." diff --git a/modules/config/default/config.el b/modules/config/default/config.el index fe294b412..8b662dee8 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -85,7 +85,7 @@ (advice-add #'delete-backward-char :override #'doom/delete-backward-char) ;; Makes `newline-and-indent' smarter when dealing with comments - (advice-add #'newline-and-indent :around #'doom*newline-and-indent)) + (advice-add #'newline-and-indent :around #'doom*newline-indent-and-continue-comments)) (when (featurep 'evil)