]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't bug out in advice--make-docstring when there's not doc string
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 10:49:49 +0000 (12:49 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 4 Oct 2022 10:50:17 +0000 (12:50 +0200)
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Don't bug
out on functions with no documentation (bug#58284).

lisp/emacs-lisp/nadvice.el

index b4acd423b8deea78a145f44ac67bb9ab6f0a3064..429052bfdf3e03fe776261d944514ec100fb284a 100644 (file)
@@ -157,7 +157,8 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are expected.")
          (when before
            (insert before)
            (ensure-empty-lines 1))
-         (insert origdoc)
+         (when origdoc
+           (insert origdoc))
          (when after
            (ensure-empty-lines 1)
            (insert after))