Function: advice--make-single-doc

advice--make-single-doc is a byte-compiled function defined in nadvice.el.gz.

Signature

(advice--make-single-doc FLIST FUNCTION MACROP)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/nadvice.el.gz
(defun advice--make-single-doc (flist function macrop)
  (let ((how (advice--how flist)))
    (concat
     (format "This %s has %s advice: "
             (if macrop "macro" "function")
             how)
     (let ((fun (advice--car flist)))
       (if (symbolp fun) (format-message "`%S'." fun)
         (let* ((name (cdr (assq 'name (advice--props flist))))
                (doc (documentation fun t))
                (usage (help-split-fundoc doc function)))
           (if usage (setq doc (cdr usage)))
           (if name
               (if doc
                   (format "%s\n%s" name doc)
                 (format "%s" name))
             (or doc "No documentation")))))
     "\n"
     (and
      (eq how :override)
      (concat
       (format-message
        "\nThis is an :override advice, which means that `%s' isn't\n" function)
       "run at all, and the documentation below may be irrelevant.\n")))))