unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
       [not found] ` <20221115175912.8BC26C00613@vcs2.savannah.gnu.org>
@ 2022-11-17  2:36   ` Michael Heerdegen
  2022-11-17  6:53     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2022-11-17  2:36 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

Eli Zaretskii <eliz@gnu.org> writes:

> branch: master
> commit 69d1278527f0a883d55b91088c8e1b04d9e07e81
> Author: Eli Zaretskii <eliz@gnu.org>
> Commit: Eli Zaretskii <eliz@gnu.org>

>  (defun eval-defun (edebug-it)
> -  "Evaluate the top-level form containing point.
> +  "Evaluate EDEBUG-IT or the top-level form containing point.

Unless I don't parse this new first sentence wrong (sorry then):

This is incorrect. EDEBUG-IT is not an expression.  It's the
prefix argument and causes the top-level form to be instrumented for
Edebug, instead of evaluating it normally.  Right?

TIA - Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17  2:36   ` master 69d1278527: ; Fix some doc strings in elisp-mode.el Michael Heerdegen
@ 2022-11-17  6:53     ` Eli Zaretskii
  2022-11-17  7:33       ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-11-17  6:53 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Thu, 17 Nov 2022 03:36:48 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > branch: master
> > commit 69d1278527f0a883d55b91088c8e1b04d9e07e81
> > Author: Eli Zaretskii <eliz@gnu.org>
> > Commit: Eli Zaretskii <eliz@gnu.org>
> 
> >  (defun eval-defun (edebug-it)
> > -  "Evaluate the top-level form containing point.
> > +  "Evaluate EDEBUG-IT or the top-level form containing point.
> 
> Unless I don't parse this new first sentence wrong (sorry then):
> 
> This is incorrect. EDEBUG-IT is not an expression.  It's the
> prefix argument and causes the top-level form to be instrumented for
> Edebug, instead of evaluating it normally.  Right?

Truth be told, I don't know.  The original doc string was obviously
incomplete, so I completed it as best I understood the code during the
5 sec I could dedicate to this task.  Part of the reason for writing
the text I installed was to prompt "Someone" to help me get our act
together in this case.

Feel free to describe in more detail what the code does with this
argument (ideally, with pointers to the code), and then we can discuss
how to improve the doc string.

Thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17  6:53     ` Eli Zaretskii
@ 2022-11-17  7:33       ` Michael Heerdegen
  2022-11-17  7:52         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2022-11-17  7:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> > This is incorrect. EDEBUG-IT is not an expression.  It's the
> > prefix argument and causes the top-level form to be instrumented for
> > Edebug, instead of evaluating it normally.  Right?
>
> Truth be told, I don't know.

Do I understand correctly that you don't ever use C-u C-M-x ?

Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17  7:33       ` Michael Heerdegen
@ 2022-11-17  7:52         ` Eli Zaretskii
  2022-11-17  9:17           ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-11-17  7:52 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: emacs-devel@gnu.org
> Date: Thu, 17 Nov 2022 08:33:53 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > This is incorrect. EDEBUG-IT is not an expression.  It's the
> > > prefix argument and causes the top-level form to be instrumented for
> > > Edebug, instead of evaluating it normally.  Right?
> >
> > Truth be told, I don't know.
> 
> Do I understand correctly that you don't ever use C-u C-M-x ?

Maybe I do, I don't remember.  But using it doesn't necessarily mean I
can immediately understand the relation to what the doc string says
(or doesn't say).



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17  7:52         ` Eli Zaretskii
@ 2022-11-17  9:17           ` Michael Heerdegen
  2022-11-17 10:34             ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2022-11-17  9:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Maybe I do, I don't remember.  But using it doesn't necessarily mean I
> can immediately understand the relation to what the doc string says
> (or doesn't say).

(info "(elisp) Instrumenting") describes everything completely and
correctly AFAIK.

Which means: EDEBUG-IT is the prefix arg and when it is specified, then
the top-level form to be evaluated is first instrumented, and then
evaluated.  Details seem to be slightly more complicated
(`edebug-read-and-maybe-wrap-form1'): defining forms are treated a bit
specially.  But that detail doesn't need to be explained in that
docstring.

`edebug-all-defs' non-nil reverts the meaning of the prefix arg of
C-M-x.  That probably should be added to the docstring.

The code... I can also only read the code, it's not trivial: when using
the prefix arg, edebug is first `requir'ed.  Loading edebug installs an
advice on `eval-defun' - that's why the recursive call of `eval-defun'
is not nonsense (you may want to add a comment to the code...).  The
advice's name is `edebug--eval-defun'.  And that works by advising
`load-read-function' to make it return instrumented code.

All only AFAIU.  Anything else I could try to answer in particular?
Maybe also Stefan wants to help...

Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17  9:17           ` Michael Heerdegen
@ 2022-11-17 10:34             ` Eli Zaretskii
  2022-11-17 23:16               ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-11-17 10:34 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: emacs-devel

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: emacs-devel@gnu.org
> Date: Thu, 17 Nov 2022 10:17:44 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Maybe I do, I don't remember.  But using it doesn't necessarily mean I
> > can immediately understand the relation to what the doc string says
> > (or doesn't say).
> 
> (info "(elisp) Instrumenting") describes everything completely and
> correctly AFAIK.

Thanks, I fixed the doc string using that.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: master 69d1278527: ; Fix some doc strings in elisp-mode.el
  2022-11-17 10:34             ` Eli Zaretskii
@ 2022-11-17 23:16               ` Michael Heerdegen
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Heerdegen @ 2022-11-17 23:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Thanks, I fixed the doc string using that.

Looks good to me.  Thanks Eli.

Michael.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-17 23:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <166853515177.10254.3755761779228774904@vcs2.savannah.gnu.org>
     [not found] ` <20221115175912.8BC26C00613@vcs2.savannah.gnu.org>
2022-11-17  2:36   ` master 69d1278527: ; Fix some doc strings in elisp-mode.el Michael Heerdegen
2022-11-17  6:53     ` Eli Zaretskii
2022-11-17  7:33       ` Michael Heerdegen
2022-11-17  7:52         ` Eli Zaretskii
2022-11-17  9:17           ` Michael Heerdegen
2022-11-17 10:34             ` Eli Zaretskii
2022-11-17 23:16               ` Michael Heerdegen

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).