From 50113c164038f63bec1ba65ac21f9c6f41bd1f16 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 19 Aug 2017 10:29:05 -0400 Subject: [PATCH 3/3] Support lazy loading for autogenerated usage docstrings too (Bug#27748) * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): Consider any documentation that ended up in code as a docstring (e.g., autogenerated (fn ARG1 ARG2) type things), not just what the user passed. --- lisp/emacs-lisp/bytecomp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d2768a159b..b11c49f230 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2607,7 +2607,7 @@ byte-compile-file-form-defmumble (let ((index ;; If there's no doc string, provide -1 as the "doc string ;; index" so that no element will be treated as a doc string. - (if (not (stringp (car body))) -1 4))) + (if (not (stringp (documentation code t))) -1 4))) ;; Output the form by hand, that's much simpler than having ;; b-c-output-file-form analyze the defalias. (byte-compile-output-docform -- 2.14.1