GNU bug report logs - #55830
`byte-compile` drops doc string

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Tue, 7 Jun 2022 11:21:01 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55830 in the body.
You can then email your comments to 55830 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55830; Package emacs. (Tue, 07 Jun 2022 11:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattiase <at> acm.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Jun 2022 11:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Subject: `byte-compile` drops doc string
Date: Tue, 7 Jun 2022 13:19:58 +0200
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?





Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Wed, 08 Jun 2022 08:30:02 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattiase <at> acm.org>:
bug acknowledged by developer. (Wed, 08 Jun 2022 08:30:02 GMT) Full text and rfc822 format available.

Message #10 received at 55830-done <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: 55830-done <at> debbugs.gnu.org
Subject: bug#55830: `byte-compile` drops doc string
Date: Wed, 8 Jun 2022 10:29:03 +0200
> 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.

Fixed on master.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Jul 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.