From unknown Sat Sep 20 05:30:46 2025 X-Loop: help-debbugs@gnu.org Subject: bug#55830: `byte-compile` drops doc string Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jun 2022 11:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55830 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 55830@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165460081422744 (code B ref -1); Tue, 07 Jun 2022 11:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2022 11:20:14 +0000 Received: from localhost ([127.0.0.1]:38636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXFu-0005um-Ac for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:20:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:38772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXFp-0005uL-6h for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:20:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXFn-0001nH-Tv for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:20:08 -0400 Received: from mail204c50.megamailservers.eu ([91.136.10.214]:46526 helo=mail193c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXFk-0002T4-Ab for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:20:07 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1654600800; bh=cyf2X4nXhix3ONh7vjctiESLwEvQVdQay/lAtDoMmLg=; h=From:Subject:Date:To:From; b=BByV7aZS0M38qwGJ5i1XnP9HVHcQOXxH+9+ot9ixUTV9mG1epx/8AbnXdWz6p586k aHY8ErqUcoyjLyxHEpdKjrnaaCcgdf2PZNvZcGdYwVTKCnzxLVXvhCjGTDzVOxx7F3 QRSOv4dSBtYa7TNTrFXp/JlP7ho8gC7ZkvbGv7zI= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 257BJx7H005821 for ; Tue, 7 Jun 2022 11:20:00 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Message-Id: Date: Tue, 7 Jun 2022 13:19:58 +0200 X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F29.629F3460.0028, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.10.214; envelope-from=mattiase@acm.org; helo=mail193c50.megamailservers.eu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) A function with doc string and interactive spec: (defun hello () "my function" (interactive) (message "hello")) Then: (byte-compile 'hello) results in the doc string being lost. This probably happens in byte-compile--reify-function where the doc = string and interactive spec are swapped around. Shouldn't that function also deal with :documentation? What about = declare forms? From unknown Sat Sep 20 05:30:46 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Subject: bug#55830: closed (bug#55830: `byte-compile` drops doc string) Message-ID: References: <58C8BDDC-B428-4D73-B43A-B9F79D80E99A@acm.org> X-Gnu-PR-Message: they-closed 55830 X-Gnu-PR-Package: emacs Reply-To: 55830@debbugs.gnu.org Date: Wed, 08 Jun 2022 08:30:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1654677002-15885-1" This is a multi-part message in MIME format... ------------=_1654677002-15885-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #55830: `byte-compile` drops doc string which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 55830@debbugs.gnu.org. --=20 55830: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D55830 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1654677002-15885-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 55830-done) by debbugs.gnu.org; 8 Jun 2022 08:29:13 +0000 Received: from localhost ([127.0.0.1]:42379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyr3w-00046t-Rq for submit@debbugs.gnu.org; Wed, 08 Jun 2022 04:29:13 -0400 Received: from mail228c50.megamailservers.eu ([91.136.10.238]:36448 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyr3s-00046g-Dv for 55830-done@debbugs.gnu.org; Wed, 08 Jun 2022 04:29:11 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1654676946; bh=t4yFSLjWKuUnuVogynZXyUYHib8QJq0bcjP7RkTT8cA=; h=From:Subject:Date:To:From; b=YkY4CazIqZ4mD606YvIXtP1zVW7wjhGgFQt8kfUtGYk7aum/NTPBxquOXeb2OXw17 CZl3uvNiJSVCCZaiXkq4UeTdFoy2EGS7BYgvpsCQjunpmlw+qb63kXEhBYCZ8ATQMF mLEIAK2UXzPwyoESnsHKR8jnsuuYDTkJegNpHxKA= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 2588T40A028742 for <55830-done@debbugs.gnu.org>; Wed, 8 Jun 2022 08:29:05 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: bug#55830: `byte-compile` drops doc string Message-Id: <58C8BDDC-B428-4D73-B43A-B9F79D80E99A@acm.org> Date: Wed, 8 Jun 2022 10:29:03 +0200 To: 55830-done@debbugs.gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F18.62A05DD2.001B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Shouldn't that function also deal with :documentation? What about declare forms? No, :documentation and declare forms are dealt with during macro-expansion. Only a literal doc string is left once the compiler gets to look at the code again. Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 55830-done 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.0 (/) > Shouldn't that function also deal with :documentation? What about = declare forms?=20 No, :documentation and declare forms are dealt with during = macro-expansion. Only a literal doc string is left once the compiler = gets to look at the code again. Fixed on master. ------------=_1654677002-15885-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jun 2022 11:20:14 +0000 Received: from localhost ([127.0.0.1]:38636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXFu-0005um-Ac for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:20:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:38772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXFp-0005uL-6h for submit@debbugs.gnu.org; Tue, 07 Jun 2022 07:20:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXFn-0001nH-Tv for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:20:08 -0400 Received: from mail204c50.megamailservers.eu ([91.136.10.214]:46526 helo=mail193c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXFk-0002T4-Ab for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 07:20:07 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1654600800; bh=cyf2X4nXhix3ONh7vjctiESLwEvQVdQay/lAtDoMmLg=; h=From:Subject:Date:To:From; b=BByV7aZS0M38qwGJ5i1XnP9HVHcQOXxH+9+ot9ixUTV9mG1epx/8AbnXdWz6p586k aHY8ErqUcoyjLyxHEpdKjrnaaCcgdf2PZNvZcGdYwVTKCnzxLVXvhCjGTDzVOxx7F3 QRSOv4dSBtYa7TNTrFXp/JlP7ho8gC7ZkvbGv7zI= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 257BJx7H005821 for ; Tue, 7 Jun 2022 11:20:00 +0000 From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: `byte-compile` drops doc string Message-Id: Date: Tue, 7 Jun 2022 13:19:58 +0200 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F29.629F3460.0028, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.10.214; envelope-from=mattiase@acm.org; helo=mail193c50.megamailservers.eu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) A function with doc string and interactive spec: (defun hello () "my function" (interactive) (message "hello")) Then: (byte-compile 'hello) results in the doc string being lost. This probably happens in byte-compile--reify-function where the doc = string and interactive spec are swapped around. Shouldn't that function also deal with :documentation? What about = declare forms? ------------=_1654677002-15885-1--