From 91ae9f3d12885373d38c3e8d693f7dc210f9d471 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Thu, 29 Dec 2022 20:19:46 +0100 Subject: [PATCH] Allow for indentation in prog-fill-reindent-defun (bug#60322) * lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Adjust regexp. --- lisp/progmodes/prog-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 5e692980b2f..2e0cb6cd25c 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -164,7 +164,7 @@ or follows point." (treesit-node-type (treesit-node-at (point))))))) (if (or treesit-text-node (nth 8 (syntax-ppss)) - (re-search-forward "^\\s<" (line-end-position) t)) + (re-search-forward "\\s-*\\s<" (line-end-position) t)) (fill-paragraph argument (region-active-p)) (beginning-of-defun) (let ((start (point))) -- 2.39.2