unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55830: `byte-compile` drops doc string
@ 2022-06-07 11:19 Mattias Engdegård
  2022-06-08  8:29 ` Mattias Engdegård
  0 siblings, 1 reply; 2+ messages in thread
From: Mattias Engdegård @ 2022-06-07 11:19 UTC (permalink / raw)
  To: 55830

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?






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#55830: `byte-compile` drops doc string
  2022-06-07 11:19 bug#55830: `byte-compile` drops doc string Mattias Engdegård
@ 2022-06-08  8:29 ` Mattias Engdegård
  0 siblings, 0 replies; 2+ messages in thread
From: Mattias Engdegård @ 2022-06-08  8:29 UTC (permalink / raw)
  To: 55830-done

> 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.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-08  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 11:19 bug#55830: `byte-compile` drops doc string Mattias Engdegård
2022-06-08  8:29 ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).