; Fix infloop in checkdoc-next-docstring
authorEshel Yaron <me@eshelyaron.com>
Fri, 23 Aug 2024 15:15:32 +0000 (17:15 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 23 Aug 2024 15:18:32 +0000 (17:18 +0200)
* lisp/emacs-lisp/checkdoc.el (checkdoc-next-docstring): Use
'beginning-of-defun-raw' instead of 'beginning-of-defun', as the latter
always moves back to beginning of line and thus is not guaranteed to
advance point when 'open-paren-in-column-0-is-defun-start' is non-nil.
(Bug#72759)

lisp/emacs-lisp/checkdoc.el

index fd25b0f981fe2766428c0e383eabe5ac43239bc3..21d40c56e747905a78d2aa6b91d0dc6b0dfbb659 100644 (file)
@@ -986,7 +986,7 @@ buffer and save warnings in a separate buffer."
 Return nil if there are no more doc strings."
   (let (found)
     (while (and (not (setq found (checkdoc--next-docstring)))
-                (beginning-of-defun -1)))
+                (beginning-of-defun-raw -1)))
     found))
 
 (defun checkdoc--next-docstring ()