Function: Man-strip-page-headers

Man-strip-page-headers is a byte-compiled function defined in man.el.gz.

Signature

(Man-strip-page-headers)

Documentation

Strip all the page headers but the first from the manpage.

Source Code

;; Defined in /usr/src/emacs/lisp/man.el.gz
(defun Man-strip-page-headers ()
  "Strip all the page headers but the first from the manpage."
  (let ((inhibit-read-only t)
	(case-fold-search nil)
	(header ""))
    (dolist (page Man-page-list)
      (and (nth 2 page)
	   (goto-char (car page))
	   (re-search-forward Man-first-heading-regexp nil t)
	   (setq header (buffer-substring (car page) (match-beginning 0)))
	   ;; Since the awk script collapses all successive blank
	   ;; lines into one, and since we don't want to get rid of
	   ;; the fast awk script, one must choose between adding
	   ;; spare blank lines between pages when there were none and
	   ;; deleting blank lines at page boundaries when there were
	   ;; some.  We choose the first, so we comment the following
	   ;; line.
	   ;; (setq header (concat "\n" header)))
	   (while (search-forward header (nth 1 page) t)
	     (replace-match ""))))))