aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2007-04-10 19:30:12 +0000
committerChong Yidong2007-04-10 19:30:12 +0000
commitc7d397233e3f2baf77c36179eae959a86866932d (patch)
treee6c7c6d294cc5637d2a6df0c24eaf7597726379b /lisp
parentd752a9f9d0ab32efe8f27c41b7d3e05df743f458 (diff)
downloademacs-c7d397233e3f2baf77c36179eae959a86866932d.tar.gz
emacs-c7d397233e3f2baf77c36179eae959a86866932d.zip
(woman-decode-buffer): Postphone macro-set check...
(woman-decode-region): ...to here.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/woman.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index 9fa2a764880..0461b553a11 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2131,18 +2131,6 @@ No external programs are used."
2131 (interactive) ; mainly for testing 2131 (interactive) ; mainly for testing
2132 (WoMan-log-begin) 2132 (WoMan-log-begin)
2133 (run-hooks 'woman-pre-format-hook) 2133 (run-hooks 'woman-pre-format-hook)
2134
2135 ;; look for macro sets that woman cannot handle:
2136 (goto-char (point-min))
2137 (let ((case-fold-search nil))
2138 (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t)
2139 (progn (goto-char (point-min))
2140 (re-search-forward "^\\.TH[ \n]" (point-max) t))
2141 (progn (goto-char (point-min))
2142 (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]"
2143 (point-max) t))))
2144 (error "WoMan can only format man pages written with the usual `-man' macros")))
2145
2146 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1)) 2134 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
2147 ;; (fundamental-mode) 2135 ;; (fundamental-mode)
2148 (let ((start-time (current-time)) ; (HIGH LOW MICROSEC) 2136 (let ((start-time (current-time)) ; (HIGH LOW MICROSEC)
@@ -2298,6 +2286,17 @@ Currently set only from '\" t in the first line of the source file.")
2298 ;; conditionals and switch source requests: 2286 ;; conditionals and switch source requests:
2299 (woman0-roff-buffer from) 2287 (woman0-roff-buffer from)
2300 2288
2289 ;; Check for macro sets that woman cannot handle:
2290 (goto-char (point-min))
2291 (let ((case-fold-search nil))
2292 (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t)
2293 (progn (goto-char (point-min))
2294 (re-search-forward "^\\.TH[ \n]" (point-max) t))
2295 (progn (goto-char (point-min))
2296 (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]"
2297 (point-max) t))))
2298 (error "WoMan can only format man pages written with the usual `-man' macros")))
2299
2301 ;; Process \k escapes BEFORE changing tab width (?): 2300 ;; Process \k escapes BEFORE changing tab width (?):
2302 (goto-char from) 2301 (goto-char from)
2303 (woman-mark-horizonal-position) 2302 (woman-mark-horizonal-position)