From: Matt Armstrong <marmstrong@google.com>
To: John Mastro <john.b.mastro@gmail.com>
Cc: David Bremner <david@tethera.net>, 24882@debbugs.gnu.org
Subject: bug#24882: 25.1; edebug-defun fails when lparen in string at BOL
Date: Wed, 30 Nov 2016 00:48:07 -0800 [thread overview]
Message-ID: <qf5eg1tuzeg.fsf@marmstrong-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <CAOj2CQSx18n=MjKMrQc9djf=P0ObKgWN_CaVWMYc_=-zZOheqA@mail.gmail.com> (John Mastro's message of "Sat, 5 Nov 2016 17:05:17 -0700")
John Mastro <john.b.mastro@gmail.com> writes:
> 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
Indeed this heuristic appears to be intentional, justified by an apeal
to efficiency. The Emacs manual uses an example very similar to
`edebug-fail' above as a "what not to do" case:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Left-Margin-Paren.html
David, if you agree with this rationale, mind closing the bug?
next prev parent reply other threads:[~2016-11-30 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-05 13:33 bug#24882: 25.1; edebug-defun fails when lparen in string at BOL David Bremner
2016-11-06 0:05 ` John Mastro
2016-11-30 8:48 ` Matt Armstrong [this message]
2016-11-30 11:59 ` David Bremner
2018-02-10 14:03 ` Noam Postavsky
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=qf5eg1tuzeg.fsf@marmstrong-macbookpro.roam.corp.google.com \
--to=marmstrong@google.com \
--cc=24882@debbugs.gnu.org \
--cc=david@tethera.net \
--cc=john.b.mastro@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.