unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Eshel Yaron <me@eshelyaron.com>
Cc: 72759@debbugs.gnu.org
Subject: bug#72759: 31.0.50; Emacs hangs with open-paren-in-column-0-is-defun-start set to nil
Date: Thu, 22 Aug 2024 19:10:28 +0300	[thread overview]
Message-ID: <86ed6gsfm3.fsf@gnu.org> (raw)
In-Reply-To: <m1ttfcd0cd.fsf@dazzs-mbp.home> (message from Eshel Yaron on Thu,  22 Aug 2024 17:49:22 +0200)

> From: Eshel Yaron <me@eshelyaron.com>
> Cc: 72759@debbugs.gnu.org
> Date: Thu, 22 Aug 2024 17:49:22 +0200
> 
> After taking another look, ISTM that the problem is that checkdoc
> assumes that beginning-of-defun either advances point or returns nil,
> but since beginning-of-defun unconditionally moves to the beginning of
> the line, it can in fact find a defun ahead of point (and thus return
> non-nil) but then move back to the beginning of the line, so point is
> unchanged.  So the assumption in checkdoc doesn't always hold when
> open-paren-in-column-0-is-defun-start is nil.  This assumption should
> still hold, however, for beginning-of-defun-raw, which doesn't go back
> to the beginning of the line.
> 
> This suggests the following change, which indeed seems to fix the hang:
> 
> 
> diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
> index 949ca6b74ad..65226d8ee44 100644
> --- a/lisp/emacs-lisp/checkdoc.el
> +++ b/lisp/emacs-lisp/checkdoc.el
> @@ -981,7 +981,7 @@ checkdoc-next-docstring
>  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))

But the doc string of beginning-of-defun-raw says, inter alia:

  This is identical to function `beginning-of-defun', except that point
  does not move to the beginning of the line when `defun-prompt-regexp'
  is non-nil.                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  ^^^^^^^^^^

Does that mean defun-prompt-regexp was non-nil in your case?  The
default is nil.





  reply	other threads:[~2024-08-22 16:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 10:07 bug#72759: 31.0.50; Emacs hangs with open-paren-in-column-0-is-defun-start set to nil Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 10:56 ` Eli Zaretskii
2024-08-22 11:31   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 12:12     ` Eli Zaretskii
2024-08-22 12:37       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 13:54         ` Eli Zaretskii
2024-08-22 15:49           ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 16:10             ` Eli Zaretskii [this message]
2024-08-22 17:08               ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-22 17:54                 ` Eli Zaretskii
2024-08-23  5:54                   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23  6:56                     ` Eli Zaretskii
2024-08-23  8:33                       ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-23 13:14                         ` Eli Zaretskii
2024-08-23 15:22                           ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ed6gsfm3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72759@debbugs.gnu.org \
    --cc=me@eshelyaron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).