bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: John Mastro
Subject: bug#24882: 25.1; edebug-defun fails when lparen in string at BOL
Date: Sat, 5 Nov 2016 17:05:17 -0700

David Bremner <david@tethera.net> wrote:
> 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 caused by the heuristic that an open paren in column zero
indicates the beginning of a defun, via end-of-defun. If you set
open-paren-in-column-0-is-defun-start to nil the recipe will work as
expected (i.e. edebug-defun will evaluate edebug-fail).

Not sure if there's anything that can be reasonably done to improve this
(other than changing the default for o-p-i-c-0-i-d-s).

        John





reply via email to

[Prev in Thread] Current Thread [Next in Thread]