Function: woman2-fc
woman2-fc is a byte-compiled function defined in woman.el.gz.
Signature
(woman2-fc TO)
Documentation
.fc a b -- Set field delimiter a and pad character b.
Format paragraphs up to TO. A VERY FIRST ATTEMPT to make fields at least readable! Needs doing properly!
Source Code
;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman2-fc (to)
".fc a b -- Set field delimiter a and pad character b.
Format paragraphs up to TO.
A VERY FIRST ATTEMPT to make fields at least readable!
Needs doing properly!"
(if (eolp)
(woman-delete-whole-line) ; ignore!
(let ((delim (following-char))
(pad ?\s) end) ; pad defaults to space
(forward-char)
(skip-chars-forward " \t")
(or (eolp) (setq pad (following-char)))
(woman-delete-whole-line)
(save-excursion
(if (re-search-forward "^[.'][ \t]*fc\\s " nil t)
(setq end (match-beginning 0))))
;; A field is contained between a pair of field delimiter
;; characters and consists of sub-strings separated by padding
;; indicator characters:
(setq delim (string delim ?\[ ?^ delim ?\] ?* delim))
(save-excursion
(while (re-search-forward delim end t)
(goto-char (match-beginning 0))
(delete-char 1)
(insert woman-unpadded-space-char)
(goto-char (match-end 0))
(delete-char -1)
(insert-before-markers woman-unpadded-space-char)
(subst-char-in-region
(match-beginning 0) (match-end 0)
pad woman-unpadded-space-char t)))))
(woman2-format-paragraphs to))