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>
Subject: bug#55830: closed (bug#55830: `byte-compile` drops doc string)
Date: Wed, 08 Jun 2022 08:30:02 +0000
[Message part 1 (text/plain, inline)]
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 <at> debbugs.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: 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.


[Message part 3 (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?




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.