Mercurial > emacs
changeset 77112:a99b2322f999
(woman-decode-buffer): Postphone macro-set check...
(woman-decode-region): ...to here.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 10 Apr 2007 19:30:12 +0000 |
parents | 5104ed9b911f |
children | 5ca8f461a8b1 |
files | lisp/woman.el |
diffstat | 1 files changed, 11 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/woman.el Tue Apr 10 19:30:01 2007 +0000 +++ b/lisp/woman.el Tue Apr 10 19:30:12 2007 +0000 @@ -2131,18 +2131,6 @@ (interactive) ; mainly for testing (WoMan-log-begin) (run-hooks 'woman-pre-format-hook) - - ;; look for macro sets that woman cannot handle: - (goto-char (point-min)) - (let ((case-fold-search nil)) - (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t) - (progn (goto-char (point-min)) - (re-search-forward "^\\.TH[ \n]" (point-max) t)) - (progn (goto-char (point-min)) - (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]" - (point-max) t)))) - (error "WoMan can only format man pages written with the usual `-man' macros"))) - (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1)) ;; (fundamental-mode) (let ((start-time (current-time)) ; (HIGH LOW MICROSEC) @@ -2298,6 +2286,17 @@ ;; conditionals and switch source requests: (woman0-roff-buffer from) + ;; Check for macro sets that woman cannot handle: + (goto-char (point-min)) + (let ((case-fold-search nil)) + (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t) + (progn (goto-char (point-min)) + (re-search-forward "^\\.TH[ \n]" (point-max) t)) + (progn (goto-char (point-min)) + (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]" + (point-max) t)))) + (error "WoMan can only format man pages written with the usual `-man' macros"))) + ;; Process \k escapes BEFORE changing tab width (?): (goto-char from) (woman-mark-horizonal-position)