Do not use mark-whole-buffer noninteractively

* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
This commit is contained in:
Ihor Radchenko 2021-09-27 21:30:43 +08:00
parent 981bcbfc14
commit db167b9999
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 3 additions and 1 deletions

View File

@ -19533,7 +19533,9 @@ a footnote definition, try to fill the first paragraph within."
(cl-case (org-element-type element)
;; Use major mode filling function is source blocks.
(src-block (org-babel-do-in-edit-buffer
(mark-whole-buffer)
(push-mark (point-min))
(goto-char (point-max))
(setq mark-active t)
(funcall-interactively #'fill-paragraph justify 'region)))
;; Align Org tables, leave table.el tables as-is.
(table-row (org-table-align) t)