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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#55830: closed (`byte-compile` drops doc string)
Date: Wed, 08 Jun 2022 08:30:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 8 Jun 2022 10:29:03 +0200
with message-id <58C8BDDC-B428-4D73-B43A-B9F79D80E99A <at> acm.org>
and subject line bug#55830: `byte-compile` drops doc string
has caused the debbugs.gnu.org bug report #55830,
regarding `byte-compile` drops doc string
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
55830: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55830
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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?



[Message part 3 (message/rfc822, inline)]
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.



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

Previous Next


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