]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow for indentation in prog-fill-reindent-defun (bug#60322)
authorTheodor Thornhill <theo@thornhill.no>
Thu, 29 Dec 2022 19:19:46 +0000 (20:19 +0100)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 29 Dec 2022 19:24:54 +0000 (21:24 +0200)
* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun):
Adjust regexp.

lisp/progmodes/prog-mode.el

index 5e692980b2fe32f4a12fd2253efc284968cecaeb..2e0cb6cd25c5190753e677e1e472e9624e16217c 100644 (file)
@@ -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)))