From db167b99997a0f01c71caf3a118e5e9af77abee4 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 27 Sep 2021 21:30:43 +0800 Subject: [PATCH] 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. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 542b77d65..4c681eb4d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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)