mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Merge pull request #2777 from sei40kr/fix-region-format
Fix region formatting
This commit is contained in:
@ -201,7 +201,7 @@ See `+format/buffer' for the interactive version of this function, and
|
|||||||
(defalias '+format/buffer #'format-all-buffer)
|
(defalias '+format/buffer #'format-all-buffer)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +format/region (beg end &optional arg)
|
(defun +format/region (beg end)
|
||||||
"Runs the active formatter on the lines within BEG and END.
|
"Runs the active formatter on the lines within BEG and END.
|
||||||
|
|
||||||
WARNING: this may not work everywhere. It will throw errors if the region
|
WARNING: this may not work everywhere. It will throw errors if the region
|
||||||
@ -211,7 +211,7 @@ snippets or single lines."
|
|||||||
(save-restriction
|
(save-restriction
|
||||||
(narrow-to-region beg end)
|
(narrow-to-region beg end)
|
||||||
(let ((+format-region-p t))
|
(let ((+format-region-p t))
|
||||||
(+format/buffer arg))))
|
(+format/buffer))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +format/region-or-buffer ()
|
(defun +format/region-or-buffer ()
|
||||||
|
Reference in New Issue
Block a user