Commit d24b0d9a authored by Chong Yidong's avatar Chong Yidong
Browse files

(woman-decode-buffer): Signal error for alien macro sets. Suggested

by James Cloos.
parent c4cdc5a1
......@@ -2102,6 +2102,18 @@ No external programs are used."
(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 manpages written in the an format")))
(and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
;; (fundamental-mode)
(let ((start-time (current-time)) ; (HIGH LOW MICROSEC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment