From unknown Tue Sep 23 03:42:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41618 <41618@debbugs.gnu.org> To: bug#41618 <41618@debbugs.gnu.org> Subject: Status: 28.0.50; Can't byte-compile an edebugged macro Reply-To: bug#41618 <41618@debbugs.gnu.org> Date: Tue, 23 Sep 2025 10:42:22 +0000 retitle 41618 28.0.50; Can't byte-compile an edebugged macro reassign 41618 emacs submitter 41618 Philipp Stephani severity 41618 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat May 30 12:45:45 2020 Received: (at submit) by debbugs.gnu.org; 30 May 2020 16:45:45 +0000 Received: from localhost ([127.0.0.1]:59029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4cC-0006eG-VG for submit@debbugs.gnu.org; Sat, 30 May 2020 12:45:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:43338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jf4cB-0006e8-PF for submit@debbugs.gnu.org; Sat, 30 May 2020 12:45:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4cB-0003qS-HS for bug-gnu-emacs@gnu.org; Sat, 30 May 2020 12:45:43 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:52721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jf4c9-0006Tm-V2 for bug-gnu-emacs@gnu.org; Sat, 30 May 2020 12:45:43 -0400 Received: by mail-wm1-x32d.google.com with SMTP id r9so6762761wmh.2 for ; Sat, 30 May 2020 09:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=W/xTR6fsEMSgSq1hPz6CxHtGSSrbZc0GDrJcE4ZaGNI=; b=btOXAmTNVYSK1n6DzoCqiCz5+ps6rZIrFhsS82vNfi66QHxmH5O4sZbMA2I1A+XCH6 FT+AwkqUIpRzanaybAyWwR/QJ11hiSrB9B25kI9EL4Osyy5bfwRbO6HMWxpNGhR6leyY 9Yhl2cHQklLq6KEmMv7pjDhUvWFpYt27S0LyTqMYw3krOsYFUWr3GwIg0FyNESgXQR3m kn/57J2CfM70REp5sOQ6AEvkRA7v/SmFiZ1EfkOKkGXBamnhsbZH5NfisytzwHGqmRrp XZBhdNKhBJbJaRISb+xqwH/TEUBITkhG13uVxdLY4HJEot5p9DksZymeqvinDpoLZVXb VKUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=W/xTR6fsEMSgSq1hPz6CxHtGSSrbZc0GDrJcE4ZaGNI=; b=mgUcgCrBlFw3Pr53jlA3y3H3E2gAlc06R4KOcdNHPc/e9V7G1JX6EXrrO1/4N9w8ez KPVevwLLZsdGqW0INQEaGAX8OO80yV3qtlT6KPaYAqc7R0N+rC8gq+bPH3lBNmUJKoNs SmphOpoPtB9YThOjqKlZPeczNyZ7l9ZT1uOx2HuI1RMCvySm8dw5ggl60uv0fFRVcRJb NCKPYzrBpYeX/BS6uksvYajECzTcUTYpJggMcYuHfVRzUyiZi5UP5WWjgV/lT/fsVRHm YlMe2RWr843KBvmw77gsoq3tQxR0+vKhQc8EbB80zv3xoIex+ME5FjfEeAzckjgX8cCN W9QA== X-Gm-Message-State: AOAM532HG0yAtRddVLQxCWYGD5ulrlJD2KNE+VdbjI7Ltoy2BDNGknp8 Gu1HAymK6rRz+RWvur0XESYCUN20syw= X-Google-Smtp-Source: ABdhPJyrwc9wY+lyLTPNrGDqMVk1Q/r9P+s9BU+pj7xKsMO5Ky5iBg8sZLwgPCTDreWyqT9q+bxw/w== X-Received: by 2002:a1c:9d96:: with SMTP id g144mr13392574wme.126.1590857139390; Sat, 30 May 2020 09:45:39 -0700 (PDT) Received: from phst1 ([2a02:2455:2a2:100:c351:ffcc:5d8e:4288]) by smtp.gmail.com with ESMTPSA id z8sm14288794wru.33.2020.05.30.09.45.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 May 2020 09:45:38 -0700 (PDT) From: Philipp Stephani To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Can't byte-compile an edebugged macro Date: Sat, 30 May 2020 18:45:37 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=p.stephani2@gmail.com; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 1. Define some arbitrary macro: (defmacro foo ()) 2. Edebug it using C-u C-M-x. 3. Attempt to byte-compile it using M-: (byte-compile 'foo). This produces an error: Wrong type argument: listp, #[0 "\300\207" [nil] 1] The stack trace is Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-functi= on () #)) eval((macro . #f(compiled-function () #)) t) #f(compiled-function (form) #)(foo) byte-compile(foo) eval((byte-compile 'foo) t) eval-expression((byte-compile 'foo) nil nil 127) funcall-interactively(eval-expression (byte-compile 'foo) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) In GNU Emacs 28.0.50 (build 19, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, = cairo version 1.16.0) of 2020-05-30 Repository revision: 3dbe6530b124436550dae4db6cd4b7b380e95377 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12007000 System Description: Debian GNU/Linux rodete Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --enable-gcc-warnings=3Dwarn-only --enable-gtk-deprecation-warnings --without-pop --with-mailutils --enable-checking --enable-check-lisp-object-type --with-modules 'CFLAGS=3D-O0 -ggdb3'' Configured features: XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils phst skeleton derived edmacro kmacro pcase ffap thingatpt url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars mailcap subr-x rx gnutls puny seq byte-opt gv bytecomp byte-compile cconv dbus xml compile comint ansi-color ring cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 69265 7079) (symbols 48 8959 1) (strings 32 23829 1591) (string-bytes 1 769536) (vectors 16 13265) (vector-slots 8 177353 6149) (floats 8 25 35) (intervals 56 212 0) (buffers 992 11)) --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls Sie diese f=C3=A4lschlicherweise erhal= ten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, l=C3=B6sche= n Sie alle Kopien und Anh=C3=A4nge davon und lassen Sie mich bitte wissen, dass d= ie E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don=E2=80=99t forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 13:01:24 2020 Received: (at 41618-done) by debbugs.gnu.org; 31 May 2020 17:01:24 +0000 Received: from localhost ([127.0.0.1]:33700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfRKu-00026J-59 for submit@debbugs.gnu.org; Sun, 31 May 2020 13:01:24 -0400 Received: from colin.muc.de ([193.149.48.1]:55102 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jfRKr-00026A-BS for 41618-done@debbugs.gnu.org; Sun, 31 May 2020 13:01:23 -0400 Received: (qmail 11734 invoked by uid 3782); 31 May 2020 17:01:19 -0000 Date: 31 May 2020 17:01:19 -0000 Message-ID: <20200531170119.11733.qmail@mail.muc.de> From: Alan Mackenzie To: Philipp Stephani Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/11.3-RELEASE-p9 (amd64)) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41618-done Cc: 41618-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Philipp. In article you wrote: > 1. Define some arbitrary macro: > (defmacro foo ()) > 2. Edebug it using C-u C-M-x. This was not actually relevant. A simple evaluation with C-M-x produces the same error. > 3. Attempt to byte-compile it using M-: (byte-compile 'foo). > This produces an error: > Wrong type argument: listp, #[0 "\300\207" [nil] 1] > The stack trace is > Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-function () #)) > eval((macro . #f(compiled-function () #)) t) > #f(compiled-function (form) #)(foo) > byte-compile(foo) > eval((byte-compile 'foo) t) > eval-expression((byte-compile 'foo) nil nil 127) > funcall-interactively(eval-expression (byte-compile 'foo) nil nil 127) > call-interactively(eval-expression nil nil) > command-execute(eval-expression) This was quite a simple bug. At the end of byte-compile, the code does two things: (i) If the argument to byte-compile is a symbol, the result is eval'd. (ii) If a macro is being compiled, 'macro is pushed onto the result. When both of these things were necessary, they were being done in the wrong order, throwing the error. I've committed a fix to the emacs-27 branch, and it should reach master the next time "somebody" copies the commits over. In the mean time, here's that patch, should you want to apply it to your system now: diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 72dbfd74b1..22e648e44b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2755,14 +2755,15 @@ byte-compile ;; Expand macros. (setq fun (byte-compile-preprocess fun)) (setq fun (byte-compile-top-level fun nil 'eval)) - (if macro (push 'macro fun)) (if (symbolp form) ;; byte-compile-top-level returns an *expression* equivalent to the ;; `fun' expression, so we need to evaluate it, tho normally ;; this is not needed because the expression is just a constant ;; byte-code object, which is self-evaluating. - (fset form (eval fun t)) - fun))))))) + (setq fun (eval fun t))) + (if macro (push 'macro fun)) + (if (symbolp form) (fset form fun)) + fun)))))) (defun byte-compile-sexp (sexp) "Compile and return SEXP." > In GNU Emacs 28.0.50 (build 19, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, cairo version 1.16.0) > of 2020-05-30 > Repository revision: 3dbe6530b124436550dae4db6cd4b7b380e95377 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12007000 > System Description: Debian GNU/Linux rodete [ .... ] -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 13:08:31 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 17:08:31 +0000 Received: from localhost ([127.0.0.1]:33713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfRRi-0002Gp-6q for submit@debbugs.gnu.org; Sun, 31 May 2020 13:08:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfRRg-0002Gb-CO for 41618@debbugs.gnu.org; Sun, 31 May 2020 13:08:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57207) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfRRa-0006lZ-N6; Sun, 31 May 2020 13:08:18 -0400 Received: from [176.228.60.248] (port=2214 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jfRRa-0002i2-2c; Sun, 31 May 2020 13:08:18 -0400 Date: Sun, 31 May 2020 20:08:17 +0300 Message-Id: <83wo4sjam6.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: <20200531170119.11733.qmail@mail.muc.de> (message from Alan Mackenzie on 31 May 2020 17:01:19 -0000) Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro References: <20200531170119.11733.qmail@mail.muc.de> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 41618 Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) > Date: 31 May 2020 17:01:19 -0000 > From: Alan Mackenzie > Cc: 41618-done@debbugs.gnu.org > > I've committed a fix to the emacs-27 branch Thanks, but why to emacs-27? Is this bug a regression from Emacs 26? If not, it doesn't sound to me like a problem that should be fixed urgently, the use case is not really that frequent, and there's an easy workaround. I'd prefer not to push anything to emacs-27 that doesn't absolutely have to be there. From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 13:41:57 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 17:41:57 +0000 Received: from localhost ([127.0.0.1]:33765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfRy9-00034Y-EZ for submit@debbugs.gnu.org; Sun, 31 May 2020 13:41:57 -0400 Received: from colin.muc.de ([193.149.48.1]:57030 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jfRy7-00034O-8a for 41618@debbugs.gnu.org; Sun, 31 May 2020 13:41:56 -0400 Received: (qmail 39609 invoked by uid 3782); 31 May 2020 17:41:53 -0000 Received: from acm.muc.de (p4fe154b5.dip0.t-ipconnect.de [79.225.84.181]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 31 May 2020 19:41:53 +0200 Received: (qmail 31461 invoked by uid 1000); 31 May 2020 17:41:53 -0000 Date: Sun, 31 May 2020 17:41:53 +0000 To: Eli Zaretskii Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro Message-ID: <20200531174153.GA30946@ACM> References: <20200531170119.11733.qmail@mail.muc.de> <83wo4sjam6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83wo4sjam6.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41618 Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Sun, May 31, 2020 at 20:08:17 +0300, Eli Zaretskii wrote: > > Date: 31 May 2020 17:01:19 -0000 > > From: Alan Mackenzie > > Cc: 41618-done@debbugs.gnu.org > > I've committed a fix to the emacs-27 branch > Thanks, but why to emacs-27? Is this bug a regression from Emacs 26? It was difficult to decide, but emacs-27 seemed right; the bug was almost certainly a regression from Emacs 26, the erroneous commit having been made on 2019-07-27. Also the fix was utterly safe, having been exhaustively tested (i.e. make bootstrap worked). > If not, it doesn't sound to me like a problem that should be fixed > urgently, the use case is not really that frequent, and there's an > easy workaround. It produced an obscure error message, for which only somebody in the know would be able to apply a workaround. > I'd prefer not to push anything to emacs-27 that doesn't absolutely > have to be there. OK. I've felt a bit unclear about this over the past few weeks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 13:56:40 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 17:56:40 +0000 Received: from localhost ([127.0.0.1]:33799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSCO-0003Q8-2B for submit@debbugs.gnu.org; Sun, 31 May 2020 13:56:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSCL-0003Pu-1i for 41618@debbugs.gnu.org; Sun, 31 May 2020 13:56:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57935) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfSCF-0008GN-IG; Sun, 31 May 2020 13:56:31 -0400 Received: from [176.228.60.248] (port=1207 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jfSCD-0006Nl-FO; Sun, 31 May 2020 13:56:31 -0400 Date: Sun, 31 May 2020 20:56:30 +0300 Message-Id: <83o8q4j8dt.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: <20200531174153.GA30946@ACM> (message from Alan Mackenzie on Sun, 31 May 2020 17:41:53 +0000) Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro References: <20200531170119.11733.qmail@mail.muc.de> <83wo4sjam6.fsf@gnu.org> <20200531174153.GA30946@ACM> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 41618 Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) > Date: Sun, 31 May 2020 17:41:53 +0000 > Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com > From: Alan Mackenzie > > > Thanks, but why to emacs-27? Is this bug a regression from Emacs 26? > > It was difficult to decide, but emacs-27 seemed right; the bug was > almost certainly a regression from Emacs 26, the erroneous commit having > been made on 2019-07-27. Which commit was that? I don't think you mentioned that. From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 13:58:05 2020 Received: (at 41618-done) by debbugs.gnu.org; 31 May 2020 17:58:05 +0000 Received: from localhost ([127.0.0.1]:33803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSDb-0003Rz-CO for submit@debbugs.gnu.org; Sun, 31 May 2020 13:58:04 -0400 Received: from mail-ot1-f49.google.com ([209.85.210.49]:45294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSDZ-0003Ri-Cx for 41618-done@debbugs.gnu.org; Sun, 31 May 2020 13:57:54 -0400 Received: by mail-ot1-f49.google.com with SMTP id m2so4191008otr.12 for <41618-done@debbugs.gnu.org>; Sun, 31 May 2020 10:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZEhz1N8QEjY/ztMOXTU65NSnxQZ0dJwjenyuneRcZ10=; b=ZqWcpKy/VYnVRxL106pSJTf2p4WhzpzkKGyQAfPltuxUuE2QDAlTpeQ/px2vxq66zc wgz5eLH+aJlnut1GSxxqeFInrummCYVUsiGXSRxbF68e2ZBvT61T6no/UW1wW4WjZ32F oLSP5ICMUVEOR5s9yIIp7peF4TFoDIapWdpsz2d1FQQH/W7xA5gM8yINriaum9NTC/ee kX5/mAZ51b9KivMFle4BiurVzB7NevOYjwqMUfyEch8pOh7JlEwpc6HIskokWSZICiMD KePbtkVLdgqqDYCG5MBeEfrKPqntZz3lm52HMSZ6PrwfqqAclPeR7hGcrNTlFLlabbU+ wa8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZEhz1N8QEjY/ztMOXTU65NSnxQZ0dJwjenyuneRcZ10=; b=PWGf4ZROSRE5ygRO2btvz0g94oUwwmJToVZPOzjrTVWasC1MSCyiR2PNhYaBpTxMUj GgY8aSs/+Y8qLVy7fIJQiRAkUWgLh9hkl55n/Oy/dNF/fu33uzFl9WtlLSXE6XeLGBaj ogCHf2lZhW5AHNHDO8uQ90OByb3remvPHTIRtQz/u4IJSmEKSO2o2mNgacLA7+U/NX20 iSbyDri3/IgiAuiIWRdbXYs5zugVvWUjsnb4qrM7YrHpBc/JF43DJY/qWFxcSGm70kGb KAMkRVmHCworJ8DuUVV1fAqxZ91FJ0iqtNo8CRIYQ57HXnaJK0V5QcQ2CoQxFRUmAur5 NXLw== X-Gm-Message-State: AOAM532lLu1wwWtxTSoghubkztmx3f5XCerrKi6wKYvE69Iyh2z82rje oL+Dko2xfVzslFgM14nICpqzaOJzvIct7Me77Cb/kSSZ X-Google-Smtp-Source: ABdhPJznCZ5oOWjyfGfBOlyueykuCy4YvDDLamZLo/chEuCPzq9q9EzuACPbeQDOhsdyXtpR51H3HAoi5YdqW8KLGdE= X-Received: by 2002:a05:6830:1457:: with SMTP id w23mr13067478otp.174.1590947867516; Sun, 31 May 2020 10:57:47 -0700 (PDT) MIME-Version: 1.0 References: <20200531170119.11733.qmail@mail.muc.de> In-Reply-To: <20200531170119.11733.qmail@mail.muc.de> From: Philipp Stephani Date: Sun, 31 May 2020 19:57:36 +0200 Message-ID: Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro To: Alan Mackenzie Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 41618-done Cc: 41618-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am So., 31. Mai 2020 um 19:01 Uhr schrieb Alan Mackenzie : > > Hello, Philipp. > > In article you wrote: > > > 1. Define some arbitrary macro: > > > (defmacro foo ()) > > > 2. Edebug it using C-u C-M-x. > > This was not actually relevant. A simple evaluation with C-M-x produces > the same error. > > > 3. Attempt to byte-compile it using M-: (byte-compile 'foo). > > > This produces an error: > > > Wrong type argument: listp, #[0 "\300\207" [nil] 1] > > > The stack trace is > > > Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-function () #)) > > eval((macro . #f(compiled-function () #)) t) > > #f(compiled-function (form) #)(foo) > > byte-compile(foo) > > eval((byte-compile 'foo) t) > > eval-expression((byte-compile 'foo) nil nil 127) > > funcall-interactively(eval-expression (byte-compile 'foo) nil nil 127) > > call-interactively(eval-expression nil nil) > > command-execute(eval-expression) > > This was quite a simple bug. At the end of byte-compile, the code does > two things: > (i) If the argument to byte-compile is a symbol, the result is eval'd. > (ii) If a macro is being compiled, 'macro is pushed onto the result. > > When both of these things were necessary, they were being done in the > wrong order, throwing the error. > > I've committed a fix to the emacs-27 branch, and it should reach master > the next time "somebody" copies the commits over. In the mean time, > here's that patch, should you want to apply it to your system now: > Thanks for the quick fix. Confirmed that it's fixed on the emacs-27 branch. From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 14:00:26 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 18:00:26 +0000 Received: from localhost ([127.0.0.1]:33811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSFn-0003XG-FK for submit@debbugs.gnu.org; Sun, 31 May 2020 14:00:25 -0400 Received: from mail-oi1-f176.google.com ([209.85.167.176]:38904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSFl-0003W3-T2 for 41618@debbugs.gnu.org; Sun, 31 May 2020 14:00:10 -0400 Received: by mail-oi1-f176.google.com with SMTP id c194so2331796oig.5 for <41618@debbugs.gnu.org>; Sun, 31 May 2020 11:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UlTwwkX5Z6xPbtxKynI3Bgj3kBg36Z3+SFL+saIpCn0=; b=e2hW+cjOOca93N8lb+JFy/AmFShiyBY1eV5G6wVHJIe6O2o7xoeky6JUnAXJ1psWIR w+xqT5olwarpX72EIUG4JNXJPzJDydx7N+BLOKjdV/f2ORAEEBVuMykwqGKDxmolYMnA SPPlmK2lFDTcPDzCBN+ezTWKyptYxVT+NeuZkxy+6hprs3F4HeQTGYuxruSGqggQad1P 0WhauyYfseqZo0m2l5abmuYNJOTFkfoV8vsT8c3dQPPmIoQylimpsU8uxx2d9FxypbrK QYFsvjLDR07PGNALocHMVjNc4h1E2wlbHJx0yOM+eWS8XcZX7qli7vHpOcF2YUQnSh/V bj5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UlTwwkX5Z6xPbtxKynI3Bgj3kBg36Z3+SFL+saIpCn0=; b=Qh9e0lq2uSQ657qkPqOtQstMxWmIOyg0mzSmCHtfxiAIiiaLwJAIcYE+EenlVuD7Bl JkKl0hA9AITJztZatYhLR3w7Z5U/jSwOQ6Wd/ZRkGiKG1t3ni2P1mtQ4CcPyMknQL2/Q c1Y69EzLRDxh1znOyWndyLL0b7mYy4f6Z/mTCbffMWZ4fMqXVrLAu/+E1ghb1VOUytEg 018j6wh+3liqeGm40M/rMCEj5x+f/8+zJIS2+4WSoPzXKbUXrXA7dnfEIVCFwbGRtLzU zQ1lkQ7Y9QARN49b7Ov8uQORigD07uPXts8f22ArR4BkZOG3IxrbshujEDeB9ViTgXa9 0YPw== X-Gm-Message-State: AOAM533PSNqd9DQ/T+kTHmEI6/24k4/c0OO1WQD3mmyim20nunzWJuGs oPRCikX01l1aa7SPbVUKAosoa/TamgYhz7zfvkuqOIKRO/U= X-Google-Smtp-Source: ABdhPJyEGkWU4p4l1pG8qY8zUiegdHJJLKLZOe7zP02FVe9roIUlvlat33O+4OkQh5dz8+6uYNVRkdYKG6LDGnoJ6o4= X-Received: by 2002:aca:51ca:: with SMTP id f193mr11339672oib.170.1590948004050; Sun, 31 May 2020 11:00:04 -0700 (PDT) MIME-Version: 1.0 References: <20200531170119.11733.qmail@mail.muc.de> <83wo4sjam6.fsf@gnu.org> <20200531174153.GA30946@ACM> <83o8q4j8dt.fsf@gnu.org> In-Reply-To: <83o8q4j8dt.fsf@gnu.org> From: Philipp Stephani Date: Sun, 31 May 2020 19:59:52 +0200 Message-ID: Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41618 Cc: Alan Mackenzie , 41618@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am So., 31. Mai 2020 um 19:56 Uhr schrieb Eli Zaretskii : > > > Date: Sun, 31 May 2020 17:41:53 +0000 > > Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com > > From: Alan Mackenzie > > > > > Thanks, but why to emacs-27? Is this bug a regression from Emacs 26? > > > > It was difficult to decide, but emacs-27 seemed right; the bug was > > almost certainly a regression from Emacs 26, the erroneous commit having > > been made on 2019-07-27. > > Which commit was that? I don't think you mentioned that. My guess is on 1c8405e33e814a372fa349313521b015c3601605, but I haven't formally bisected. From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 14:04:37 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 18:04:37 +0000 Received: from localhost ([127.0.0.1]:33830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSK5-0003ds-5H for submit@debbugs.gnu.org; Sun, 31 May 2020 14:04:37 -0400 Received: from colin.muc.de ([193.149.48.1]:58101 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jfSK3-0003dj-BV for 41618@debbugs.gnu.org; Sun, 31 May 2020 14:04:35 -0400 Received: (qmail 55129 invoked by uid 3782); 31 May 2020 18:04:33 -0000 Received: from acm.muc.de (p4fe154b5.dip0.t-ipconnect.de [79.225.84.181]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 31 May 2020 20:04:32 +0200 Received: (qmail 31499 invoked by uid 1000); 31 May 2020 18:04:33 -0000 Date: Sun, 31 May 2020 18:04:33 +0000 To: Eli Zaretskii Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro Message-ID: <20200531180433.GB30946@ACM> References: <20200531170119.11733.qmail@mail.muc.de> <83wo4sjam6.fsf@gnu.org> <20200531174153.GA30946@ACM> <83o8q4j8dt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83o8q4j8dt.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41618 Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Sun, May 31, 2020 at 20:56:30 +0300, Eli Zaretskii wrote: > > Date: Sun, 31 May 2020 17:41:53 +0000 > > Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com > > From: Alan Mackenzie > > > Thanks, but why to emacs-27? Is this bug a regression from Emacs 26? > > It was difficult to decide, but emacs-27 seemed right; the bug was > > almost certainly a regression from Emacs 26, the erroneous commit having > > been made on 2019-07-27. > Which commit was that? I don't think you mentioned that. I didn't, sorry. It was: commit 1c8405e33e814a372fa349313521b015c3601605 Author: Stefan Monnier Date: Sat Jul 27 17:28:10 2019 -0400 * lisp/emacs-lisp/bytecomp.el (byte-compile-out-toplevel): Fix * bug#34757 This fix was provided by Pip Cet . It tightens the code that tries to recognize a bytecode sequence as being a simple function call (to then decompile it), which occasionally misfired. I added some minor changes found while investigating this issue. (byte-compile): Handle corner case where byte-compile-top-level returns a non-self-evaluating expression. (byte-compile-out-toplevel): Remove support for `progn` and `t` values of output-type which aren't used anywhere. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun May 31 14:21:29 2020 Received: (at 41618) by debbugs.gnu.org; 31 May 2020 18:21:29 +0000 Received: from localhost ([127.0.0.1]:33843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSaP-00042a-Ar for submit@debbugs.gnu.org; Sun, 31 May 2020 14:21:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfSaN-00042N-5Z for 41618@debbugs.gnu.org; Sun, 31 May 2020 14:21:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58387) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfSaH-0005Mu-BX; Sun, 31 May 2020 14:21:21 -0400 Received: from [176.228.60.248] (port=2717 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jfSaG-0004Ew-Pw; Sun, 31 May 2020 14:21:21 -0400 Date: Sun, 31 May 2020 21:21:20 +0300 Message-Id: <83lfl8j78f.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: <20200531180433.GB30946@ACM> (message from Alan Mackenzie on Sun, 31 May 2020 18:04:33 +0000) Subject: Re: bug#41618: 28.0.50; Can't byte-compile an edebugged macro References: <20200531170119.11733.qmail@mail.muc.de> <83wo4sjam6.fsf@gnu.org> <20200531174153.GA30946@ACM> <83o8q4j8dt.fsf@gnu.org> <20200531180433.GB30946@ACM> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 41618 Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) > Date: Sun, 31 May 2020 18:04:33 +0000 > Cc: 41618@debbugs.gnu.org, p.stephani2@gmail.com > From: Alan Mackenzie > > > > It was difficult to decide, but emacs-27 seemed right; the bug was > > > almost certainly a regression from Emacs 26, the erroneous commit having > > > been made on 2019-07-27. > > > Which commit was that? I don't think you mentioned that. > > I didn't, sorry. It was: > > commit 1c8405e33e814a372fa349313521b015c3601605 > Author: Stefan Monnier > Date: Sat Jul 27 17:28:10 2019 -0400 Then I guess it's okay to fix this on emacs-27. Thanks. From unknown Tue Sep 23 03:42:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 29 Jun 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator