refactor(org): remove +org-fix-newline-and-indent-in-src-blocks-a

Our rebinding of RET to +org/return in insert mode, already
accompolishes was this advice sets out to do.
This commit is contained in:
Henrik Lissner
2025-08-23 12:33:24 +02:00
parent 41876aa036
commit 13ffb0fed3

View File

@@ -253,16 +253,6 @@ Also adds support for a `:sync' parameter to override `:async'."
(funcall orig-fn arg info params)
(funcall fn orig-fn arg info params)))))
(defadvice! +org-fix-newline-and-indent-in-src-blocks-a (&optional indent _arg _interactive)
"Mimic `newline-and-indent' in src blocks w/ lang-appropriate indentation."
:after #'org-return
(when (and indent
org-src-tab-acts-natively
(org-in-src-block-p t))
(save-window-excursion
(org-babel-do-in-edit-buffer
(call-interactively #'indent-for-tab-command)))))
(defadvice! +org-inhibit-mode-hooks-a (fn datum name &optional initialize &rest args)
"Prevent potentially expensive mode hooks in `org-babel-do-in-edit-buffer' ops."
:around #'org-src--edit-element