Subject: bug#55830: `byte-compile` drops doc string

From: Mattias Engdegård <[email-masked]>
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?