aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-12-24 03:15:53 +0000
committerChong Yidong2006-12-24 03:15:53 +0000
commitd24b0d9a33f43d4338dddd9c402e855d6b561e75 (patch)
tree27396e81bc1961a1517822f8e20502e190b1fe44
parentc4cdc5a182b3ad0337c30ec7fad7e1f4e818d859 (diff)
downloademacs-d24b0d9a33f43d4338dddd9c402e855d6b561e75.tar.gz
emacs-d24b0d9a33f43d4338dddd9c402e855d6b561e75.zip
(woman-decode-buffer): Signal error for alien macro sets. Suggested
by James Cloos.
-rw-r--r--lisp/woman.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index e8387584ab7..2d3513f0097 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2102,6 +2102,18 @@ No external programs are used."
2102 (interactive) ; mainly for testing 2102 (interactive) ; mainly for testing
2103 (WoMan-log-begin) 2103 (WoMan-log-begin)
2104 (run-hooks 'woman-pre-format-hook) 2104 (run-hooks 'woman-pre-format-hook)
2105
2106 ;; look for macro sets that woman cannot handle:
2107 (goto-char (point-min))
2108 (let ((case-fold-search nil))
2109 (unless (and (re-search-forward "^\\.SH[ \n]" (point-max) t)
2110 (progn (goto-char (point-min))
2111 (re-search-forward "^\\.TH[ \n]" (point-max) t))
2112 (progn (goto-char (point-min))
2113 (not (re-search-forward "^\\.\\([pnil]p\\|sh\\)[ \n]"
2114 (point-max) t))))
2115 (error "WoMan can only format manpages written in the an format")))
2116
2105 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1)) 2117 (and (boundp 'font-lock-mode) font-lock-mode (font-lock-mode -1))
2106 ;; (fundamental-mode) 2118 ;; (fundamental-mode)
2107 (let ((start-time (current-time)) ; (HIGH LOW MICROSEC) 2119 (let ((start-time (current-time)) ; (HIGH LOW MICROSEC)