Function: woman-find-next-control-line

woman-find-next-control-line is a byte-compiled function defined in woman.el.gz.

Signature

(woman-find-next-control-line &optional PAT)

Documentation

Find and return start of next control line.

PAT, if non-nil, specifies an additional component of the control line regexp to search for, which is appended to the default regexp, "\\(\\\\c\\)?\\n[.\\=']".

Source Code

;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-find-next-control-line (&optional pat)
  "Find and return start of next control line.
PAT, if non-nil, specifies an additional component of the control
line regexp to search for, which is appended to the default
regexp, \"\\(\\\\c\\)?\\n[.\\=']\"."
  (let ((pattern (concat "\\(\\\\c\\)?\n[.']" pat))
        to)
    (save-excursion
      ;; Must handle
      ;; ...\c
      ;; .br (and other requests?)
      ;; by deleting both the \c and the following request.
      ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!!
      (while
	  (and
	   (setq to (re-search-forward pattern nil t))
	   (match-beginning 1)
	   (looking-at "br"))
	(goto-char (match-beginning 0))
	(woman-delete-line 2)))
    (if to
	(- to (+ 1 (length pat)))
      (point-max))))