]> git.eshelyaron.com Git - emacs.git/commitdiff
(ad-make-single-advice-docstring): Treat case with no doctring specially.
authorDave Love <fx@gnu.org>
Tue, 10 Aug 1999 09:51:17 +0000 (09:51 +0000)
committerDave Love <fx@gnu.org>
Tue, 10 Aug 1999 09:51:17 +0000 (09:51 +0000)
lisp/emacs-lisp/advice.el

index 6148435c30804b7bd507504571960ce3ed2e36ac..9f670e8010c172d2c4b29f059259698e177784a0 100644 (file)
@@ -2983,10 +2983,14 @@ Example: `(ad-map-arglists '(a &rest args) '(w x y z))' will return
                   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.