Don't produce zero-length lazy strings

* lisp/emacs-lisp/bytecomp.el (byte-compile--docstring):
There is no gain from making an empty string lazy.
(It also contributed to bug#80292.)
This commit is contained in:
Mattias Engdegård 2026-01-31 15:55:47 +01:00
parent 385bcc6117
commit 87dfb040b0

View file

@ -1856,7 +1856,8 @@ It is too wide if it has any lines longer than the largest of
;; The native compiler doesn't use those dynamic docstrings.
(not byte-native-compiling)
;; Docstrings can only be dynamic when compiling a file.
byte-compile--\#$)
byte-compile--\#$
(not (equal doc ""))) ; empty lazy strings are pointless
(let* ((byte-pos (with-memoization
;; Reuse a previously written identical docstring.
;; This is not done out of thriftiness but to try and