Function: woman-pre-process-region
woman-pre-process-region is a byte-compiled function defined in
woman.el.gz.
Signature
(woman-pre-process-region FROM TO)
Documentation
Pre-process escapes and comments in the region of text between FROM and TO.
To be called on original buffer and any .so insertions.
Source Code
;; Defined in /usr/src/emacs/lisp/woman.el.gz
(defun woman-pre-process-region (from to)
"Pre-process escapes and comments in the region of text between FROM and TO.
To be called on original buffer and any .so insertions."
;; Hide escaped escapes \\ and printable escapes \e very early
;; (to be re-instated as just \ very late!):
(goto-char from)
;; .eo turns off escape character processing
(while (re-search-forward "\\(\\\\[\\e]\\)\\|^\\.eo" to t) ; \\
(if (match-beginning 1)
(replace-match woman-escaped-escape-string t t)
(woman-delete-whole-line)
;; .ec turns on escape character processing (and sets the
;; escape character to its argument, if any, which I'm ignoring
;; for now!)
(while (and (re-search-forward "\\(\\\\\\)\\|^\\.ec" to t) ; \
(match-beginning 1))
(replace-match woman-escaped-escape-string t t))
;; ***** Need test for .ec arg and warning here! *****
(woman-delete-whole-line)))
;; Delete comments .\"<anything>, \"<anything> and null requests.
;; (However, should null . requests cause a break?)
(goto-char from)
(while (re-search-forward "^[.'][ \t]*\\(\\\\\".*\\)?\n\\|\\\\\".*" to t)
(woman-delete-match 0)))