unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
@ 2022-01-17 23:48 Michael Heerdegen
  2022-01-18  8:48 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2022-01-17 23:48 UTC (permalink / raw)
  To: 53331


The manual (info "(elisp) Edebug Options") tells:

 -- User Option: edebug-all-defs
     If this is non-‘nil’, normal evaluation of defining forms such as
     ‘defun’ and ‘defmacro’ instruments them for Edebug.  This applies
     to ‘eval-defun’, ‘eval-region’, ‘eval-buffer’, and
     ‘eval-current-buffer’.

For `eval-defun' this isn't the case: Any defun is not instrumented
after enabling `edebug-all-defs' and hitting C-M-x.

The current `eval-defun' code actually looks like an accident: The only
effect of an enabled `edebug-all-defs' is that C-M-x _with_ a prefix arg
also _doesn't_ instrument then.

Thanks,

Michael.


In GNU Emacs 29.0.50 (build 30, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
 of 2022-01-18 built on drachen
Repository revision: 12c60373acc061cbe5261fd2b49170bb1fe0f0af
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)





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

* bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
  2022-01-17 23:48 bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs Michael Heerdegen
@ 2022-01-18  8:48 ` Andreas Schwab
  2022-01-19  0:30   ` Michael Heerdegen
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2022-01-18  8:48 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 53331

On Jan 18 2022, Michael Heerdegen wrote:

> For `eval-defun' this isn't the case: Any defun is not instrumented
> after enabling `edebug-all-defs' and hitting C-M-x.

There is an advice around eval-defun once edebug is loaded.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





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

* bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
  2022-01-18  8:48 ` Andreas Schwab
@ 2022-01-19  0:30   ` Michael Heerdegen
  2022-01-21 11:26     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2022-01-19  0:30 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 53331

Andreas Schwab <schwab@linux-m68k.org> writes:

> > For `eval-defun' this isn't the case: Any defun is not instrumented
> > after enabling `edebug-all-defs' and hitting C-M-x.
>
> There is an advice around eval-defun once edebug is loaded.

Ah - thanks, I had missed that.

So the problem is that when you enable edebug-all-defs but don't
explicitly load edebug, the advice is not yet installed and thus
`eval-defun' does not instrument.

I guess what we really want is to get rid of the advices altogether, so
it's not worth to add another hack to support this corner case.

Thanks,

Michael.





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

* bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs
  2022-01-19  0:30   ` Michael Heerdegen
@ 2022-01-21 11:26     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-21 11:26 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Andreas Schwab, 53331

Michael Heerdegen <michael_heerdegen@web.de> writes:

> So the problem is that when you enable edebug-all-defs but don't
> explicitly load edebug, the advice is not yet installed and thus
> `eval-defun' does not instrument.

Looks like it.

> I guess what we really want is to get rid of the advices altogether, so
> it's not worth to add another hack to support this corner case.

Perhaps the edebug-all-defs user option should have a setting form that
loads edebug?  That'd make this work for people that use Customize, at
least.

Uhm...  Oh, right.  It just needs:

  :require 'edebug

And the doc string should mention this; I'll fix both things.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-01-21 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 23:48 bug#53331: 29.0.50; eval-defun doesn't respect edebug-all-defs Michael Heerdegen
2022-01-18  8:48 ` Andreas Schwab
2022-01-19  0:30   ` Michael Heerdegen
2022-01-21 11:26     ` Lars Ingebrigtsen

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