From 13ffb0fed3723efaa247cbf6d1ca1b3835e61f7f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 23 Aug 2025 12:33:24 +0200 Subject: [PATCH] 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. --- modules/lang/org/config.el | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index e0f6b409a..b9fa97c0b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -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