[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When calling defuns is a Bad Thing.
From: |
Alan Mackenzie |
Subject: |
When calling defuns is a Bad Thing. |
Date: |
Sun, 21 Oct 2018 16:41:10 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Emacs.
Calling defuns (as opposed to primitives) from edebug is a bad idea,
unless those defuns are also defined in edebug.el.
The reason is that edebug.el exists to debug these defuns, and if the
edebug engine uses a defun which happens to be instrumented, Emacs will
(probably) lock up.
For the same reason, edebug should probably avoid using "complicated"
macros, such as the pcase family and cl-... because it is difficult to be
sure that their expansions will not introduce non-primitives into the
code.
Currently, edebug calls (at least) one-window-p and walk-windows, which
it shouldn't. Possibly, it should define edebug- versions of them.
There are also quite a few uses of cl-... which is somewhat worrying.
At the very least, edebug should NOT replace its own edebug-pop-to-buffer
with pop-to-buffer, as has been suggested in a comment.
Comments?
--
Alan Mackenzie (Nuremberg, Germany).
- When calling defuns is a Bad Thing.,
Alan Mackenzie <=