summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-06-08 10:03:55 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-06-08 10:08:05 +0200
commit493ae66be08a99ea7918ee8210aec3eb925c8fad (patch)
treed6f439588c4a4c45b727c9f62ae4beecaeda2771 /lisp/emacs-lisp
parent22d3f0e95a5602b2bde763cff185f5b4fed6e53e (diff)
downloademacs-493ae66be08a99ea7918ee8210aec3eb925c8fad.tar.gz
emacs-493ae66be08a99ea7918ee8210aec3eb925c8fad.tar.bz2
emacs-493ae66be08a99ea7918ee8210aec3eb925c8fad.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el1
1 files changed, 1 insertions, 0 deletions
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