emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/woman.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/woman.el,v
Date: Sun, 24 Dec 2006 03:15:53 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      06/12/24 03:15:53

Index: woman.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/woman.el,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- woman.el    5 Dec 2006 06:57:39 -0000       1.50
+++ woman.el    24 Dec 2006 03:15:53 -0000      1.51
@@ -2102,6 +2102,18 @@
   (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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]