changeset 25208:76f5f50e7742

(ad-make-single-advice-docstring): Treat case with no doctring specially.
author Dave Love <fx@gnu.org>
date Tue, 10 Aug 1999 09:51:17 +0000
parents e62d2121822f
children eea9647c8246
files lisp/emacs-lisp/advice.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/advice.el	Mon Aug 09 08:56:31 1999 +0000
+++ b/lisp/emacs-lisp/advice.el	Tue Aug 10 09:51:17 1999 +0000
@@ -2983,10 +2983,14 @@
 		   class (ad-advice-name advice)
 		   (if advice-docstring "\n" "")
 		   (or advice-docstring "")))
-	  (t (format "%s-advice `%s':%s%s"
-		     (capitalize (symbol-name class)) (ad-advice-name advice)
-		     (if advice-docstring "\n" "")
-		     (or advice-docstring ""))))))
+	  (t (if advice-docstring
+		 (format "%s-advice `%s':\n%s"
+			 (capitalize (symbol-name class))
+			 (ad-advice-name advice)
+			 advice-docstring)
+	       (format "%s-advice `%s'."
+		       (capitalize (symbol-name class))
+		       (ad-advice-name advice)))))))
 
 (defun ad-make-advised-docstring (function &optional style)
   ;;"Constructs a documentation string for the advised FUNCTION.