Generic Function: DOCSTRING-FIRST-SENTENCE

Documentation

Returns the first sentence of DESCRIPTOR's docstring. Returns at most LIMIT characters (if the first sentence is longer than LIMIT characters it will be simply truncated. If DESCRIPTOR's docstring is NIL this function returns nil.

Source

(defgeneric docstring-first-sentence (descriptor &optional limit)
  (:documentation "Returns the first sentence of DESCRIPTOR's
docstring. Returns at most LIMIT characters (if the first
sentence is longer than LIMIT characters it will be simply
truncated. If DESCRIPTOR's docstring is NIL this function
returns nil.")
  (:method ((descriptor descriptor) &optional (limit 180))
    (when (not (null (docstring descriptor)))
      (subseq-first-sentence (docstring descriptor) limit))))
Source Context