diff --git a/core/core-editor.el b/core/core-editor.el index 0bbaa4b21..4b178e97c 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -112,17 +112,6 @@ with functions that require it (like modeline segments)." buffer)) (advice-add #'make-indirect-buffer :around #'doom*set-indirect-buffer-filename) -(defun doom*delete-trailing-whitespace (orig-fn &rest args) - "Don't affect trailing whitespace on current line." - (let ((linestr (buffer-substring-no-properties - (line-beginning-position) - (line-end-position)))) - (apply orig-fn args) - (when (and (if (featurep 'evil) (evil-insert-state-p) t) - (string-match-p "^[\s\t]*$" linestr)) - (insert linestr)))) -(advice-add #'delete-trailing-whitespace :around #'doom*delete-trailing-whitespace) - (push '("/LICENSE$" . text-mode) auto-mode-alist)