Subject: Re: bug#24882: 25.1; edebug-defun fails when lparen in string at BOL

From: Noam Postavsky <[email-masked]>
Date: Sat, 10 Feb 2018 09:03:30 -0500

tags 24882 fixed
close 24882 27.1
quit

David Bremner <[email-masked]> writes:

> 1) save the following definitions into a file edebug-fail.el
>
> (defun edebug-fail ()
>   "blah"
>   (glub "foo
> (bar)"))
>
> (defun edebug-success ()
>   "blah"
>   (glub "foo (bar)"))
>
> 2) emacs -Q edebug-defun.el
>
> 3) place the point after the defun for edebug fail
>
> 4) run M-x edebug-defun ; observe the next defun, for edebug-success is
> evaled.
>
> 5) Add a space before (bar), repeat step 4. Observe the correct function
> definition is evaluated

This is fixed in master.

[1: 14b9558752]: 2017-12-12 23:03:00 -0500
  * src/syntax.c (find_defun_start): Use syntax-ppss
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=14b95587520959c5b54356547a0a69932a9bb480