From 535eec3bca36b84b104a4041f7bcdd5b1649a94b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 4 Oct 2022 12:49:49 +0200 Subject: [PATCH] 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). --- lisp/emacs-lisp/nadvice.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.39.2