Function: helpful--skip-advice

helpful--skip-advice is a natively compiled function defined in helpful.el.

Signature

(helpful--skip-advice DOCSTRING)

Documentation

Remove mentions of advice from DOCSTRING.

Source Code

;; Defined in /nix/store/mvfc1hll8a1f23ivm3qmzj4bn64jr3x7-emacs-packages-deps/share/emacs/site-lisp/elpa/helpful-20250408.334/helpful.el
;; TODO: this isn't sufficient for `edebug-eval-defun'.
(defun helpful--skip-advice (docstring)
  "Remove mentions of advice from DOCSTRING."
  (let* ((lines (s-lines docstring))
         (relevant-lines
          (--drop-while
           (or (s-starts-with-p ":around advice:" it)
               (s-starts-with-p "This function has :around advice:" it))
           lines)))
    (s-trim (s-join "\n" relevant-lines))))