mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-29 14:33:34 -05:00
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:
@@ -253,16 +253,6 @@ Also adds support for a `:sync' parameter to override `:async'."
|
|||||||
(funcall orig-fn arg info params)
|
(funcall orig-fn arg info params)
|
||||||
(funcall fn 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)
|
(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."
|
"Prevent potentially expensive mode hooks in `org-babel-do-in-edit-buffer' ops."
|
||||||
:around #'org-src--edit-element
|
:around #'org-src--edit-element
|
||||||
|
Reference in New Issue
Block a user