From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: When calling defuns is a Bad Thing. Date: Sun, 21 Oct 2018 16:41:10 +0000 Message-ID: <20181021164110.GA4664@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1540140473 10522 195.159.176.226 (21 Oct 2018 16:47:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 Oct 2018 16:47:53 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Gemini Lasswell To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 21 18:47:49 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEGtJ-0002bX-1D for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2018 18:47:49 +0200 Original-Received: from localhost ([::1]:59643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEGvO-0000lT-RV for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2018 12:49:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEGvH-0000lC-QQ for emacs-devel@gnu.org; Sun, 21 Oct 2018 12:49:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEGvC-0001Bo-S6 for emacs-devel@gnu.org; Sun, 21 Oct 2018 12:49:51 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:56348 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gEGvC-0001At-GF for emacs-devel@gnu.org; Sun, 21 Oct 2018 12:49:46 -0400 Original-Received: (qmail 3614 invoked by uid 3782); 21 Oct 2018 16:49:43 -0000 Original-Received: from acm.muc.de (p5B14680F.dip0.t-ipconnect.de [91.20.104.15]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 21 Oct 2018 18:49:42 +0200 Original-Received: (qmail 4935 invoked by uid 1000); 21 Oct 2018 16:41:10 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230546 Archived-At: 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).