From 493ae66be08a99ea7918ee8210aec3eb925c8fad Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Wed, 8 Jun 2022 10:03:55 +0200 Subject: Preserve doc string in `byte-compile` (bug#55830) * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Don't transpose doc string and interactive spec, which must come in this order. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-function-attributes): New test. --- lisp/emacs-lisp/bytecomp.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2e89504e8ff..ab21fba8a27 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2926,6 +2926,7 @@ FUN should be either a `lambda' value or a `closure' value." (push (pop body) preamble)) (when (eq (car-safe (car body)) 'interactive) (push (pop body) preamble)) + (setq preamble (nreverse preamble)) ;; Turn the function's closed vars (if any) into local let bindings. (dolist (binding env) (cond -- cgit v1.2.3