From ae7761598dc95a65491cfff978bb5119ccdc6b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 30 Jan 2026 15:42:53 +0100 Subject: [PATCH] Pass lazy doc string to 'defalias' * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias): We correctly emit a lazy-loaded doc string but then passed a literal string to 'defalias' by mistake; fix that. Saves 40 KiB in .elc files. --- lisp/emacs-lisp/bytecomp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 52bc20af173..edfd9491a2f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -5141,7 +5141,8 @@ binding slots have been popped." (when (stringp doc) (setq rest (byte-compile--list-with-n rest 0 - (byte-compile--docstring doc (nth 0 form) name))))) + (byte-compile--docstring doc (nth 0 form) name))) + (setq form (nconc (take 3 form) rest)))) (pcase-let* ;; `macro' is non-nil if it defines a macro. ;; `fun' is the function part of `arg' (defaults to `arg').