mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Remove doom*delete-trailing-whitespace advice (unneeded)
This commit is contained in:
@ -112,17 +112,6 @@ with functions that require it (like modeline segments)."
|
|||||||
buffer))
|
buffer))
|
||||||
(advice-add #'make-indirect-buffer :around #'doom*set-indirect-buffer-filename)
|
(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)
|
(push '("/LICENSE$" . text-mode) auto-mode-alist)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user