X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2Fmanual%2Fdocstrings.lisp;h=c9627069d81133e657cc6fe1f4a73c9d8ffaba41;hb=eaa8a506790bb6ed627da617247bfd13802eb365;hp=09657597113f19a4cae4885a291c9a80e8df9075;hpb=53f4147704fbe48c03dd73d7b6a9f92c0a066ed8;p=sbcl.git diff --git a/doc/manual/docstrings.lisp b/doc/manual/docstrings.lisp index 0965759..c962706 100644 --- a/doc/manual/docstrings.lisp +++ b/doc/manual/docstrings.lisp @@ -102,6 +102,9 @@ you deserve to lose.") (t (cons (car list) (flatten (cdr list)))))) +(defun whitespacep (char) + (find char #(#\tab #\space #\page))) + (defun setf-name-p (name) (or (symbolp name) (and (listp name) (= 2 (length name)) (eq (car name) 'setf)))) @@ -437,13 +440,13 @@ variables if the symbol in question is contained in symbols ;;; lisp sections (defun lisp-section-p (line line-number lines) - "Returns T if the given LINE looks like start of lisp code -- ie. if -it starts with whitespace followed by a paren, and the previous line -is empty" + "Returns T if the given LINE looks like start of lisp code -- +ie. if it starts with whitespace followed by a paren or +semicolon, and the previous line is empty" (let ((offset (indentation line))) (and offset (plusp offset) - (eql #\( (find-if-not (lambda (c) (eql #\Space c)) line)) + (find (find-if-not #'whitespacep line) "(;") (empty-p (1- line-number) lines)))) (defun collect-lisp-section (lines line-number)