refactor(format): rename to +format/org-blocks-in-region
To better reflect that it operates on multiple blocks. Ref: #7936
This commit is contained in:
parent
7543b04e15
commit
1eaa1aef2c
2 changed files with 5 additions and 5 deletions
|
@ -28,7 +28,7 @@
|
||||||
(+format-region beg end))))))))
|
(+format-region beg end))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +format/org-block-in-region (beg end)
|
(defun +format/org-blocks-in-region (beg end)
|
||||||
"Calls `+format/org-block' in each src block between BEG and END (inclusive)."
|
"Calls `+format/org-block' in each src block between BEG and END (inclusive)."
|
||||||
(interactive (doom-region t))
|
(interactive (doom-region t))
|
||||||
(unless (derived-mode-p 'org-mode)
|
(unless (derived-mode-p 'org-mode)
|
||||||
|
@ -53,12 +53,12 @@
|
||||||
(message "Formatted %d src block(s)" n)))
|
(message "Formatted %d src block(s)" n)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +format/org-block-at-point-or-in-region ()
|
(defun +format/org-blocks-at-point-or-in-region ()
|
||||||
"See `+format/org-block' and `+format/org-block-in-region'."
|
"See `+format/org-block' and `+format/org-blocks-in-region'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(if (doom-region-active-p)
|
(if (doom-region-active-p)
|
||||||
#'+format/org-block-in-region
|
#'+format/org-blocks-in-region
|
||||||
#'+format/org-block)))
|
#'+format/org-block)))
|
||||||
|
|
||||||
;;; org.ell ends here
|
;;; org.ell ends here
|
||||||
|
|
|
@ -354,7 +354,7 @@ Otherwise, falls back to `org-fill-paragraph' to reflow paragraphs."
|
||||||
;; (org-update-statistics-cookies t)
|
;; (org-update-statistics-cookies t)
|
||||||
;; ...)
|
;; ...)
|
||||||
(if (modulep! :editor format)
|
(if (modulep! :editor format)
|
||||||
(call-interactively #'+format/org-block-in-region)
|
(call-interactively #'+format/org-blocks-in-region)
|
||||||
(message ":editor format is disabled, skipping reformatting of org-blocks")))
|
(message ":editor format is disabled, skipping reformatting of org-blocks")))
|
||||||
((org-in-src-block-p nil element)
|
((org-in-src-block-p nil element)
|
||||||
(unless (modulep! :editor format)
|
(unless (modulep! :editor format)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue