Function: cider-browse-ns--first-doc-line

cider-browse-ns--first-doc-line is a byte-compiled function defined in cider-browse-ns.el.

Signature

(cider-browse-ns--first-doc-line DOC)

Documentation

Return the first line of the given DOC string.

If the first line of the DOC string contains multiple sentences, only the first sentence is returned. If the DOC string is nil, a Not documented string is returned.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-browse-ns.el
(defun cider-browse-ns--first-doc-line (doc)
  "Return the first line of the given DOC string.
If the first line of the DOC string contains multiple sentences, only
the first sentence is returned.  If the DOC string is nil, a Not documented
string is returned."
  (if doc
      (let* ((split-newline (split-string doc "\n"))
             (first-line (car split-newline)))
        (cond
         ((string-match "\\. " first-line) (substring first-line 0 (match-end 0)))
         ((= 1 (length split-newline)) first-line)
         (t (concat first-line "..."))))
    "Not documented."))