From: Lars Ingebrigtsen Date: Tue, 4 Oct 2022 10:49:49 +0000 (+0200) Subject: Don't bug out in advice--make-docstring when there's not doc string X-Git-Tag: emacs-29.0.90~1856^2~41 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=535eec3bca36b84b104a4041f7bcdd5b1649a94b;p=emacs.git Don't bug out in advice--make-docstring when there's not doc string * lisp/emacs-lisp/nadvice.el (advice--make-docstring): Don't bug out on functions with no documentation (bug#58284). --- diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index b4acd423b8d..429052bfdf3 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -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))