From: Theodor Thornhill Date: Thu, 29 Dec 2022 19:19:46 +0000 (+0100) Subject: Allow for indentation in prog-fill-reindent-defun (bug#60322) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=91ae9f3d12885373d38c3e8d693f7dc210f9d471;p=emacs.git Allow for indentation in prog-fill-reindent-defun (bug#60322) * lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Adjust regexp. --- 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)))