I would like to fill justify all paragraphs in the current buffer if no region is selected. I wrote the the following function which performs this job.
Is there a better way to write this function? Is there a build-in function which performs this job?
(defun my-fill-buffer () (interactive) (if (not (region-active-p)) (save-excursion (mark-whole-buffer) (call-interactively 'fill-region))))