Fix two woman bugs.
authorKevin Ryde <user42@zip.com.au>
Tue, 7 Aug 2012 03:57:05 +0000 (11:57 +0800)
committerChong Yidong <cyd@gnu.org>
Tue, 7 Aug 2012 03:57:05 +0000 (11:57 +0800)
* lisp/woman.el (woman0-if): Quietly treat ".if v" as false.
(woman-parse-numeric-value): On a bad .IP line, issue a warning
and continue processing.

Fixes: debbugs:12110 debbugs:12109

lisp/ChangeLog
lisp/woman.el

index 5d915a3..d0d4a31 100644 (file)
@@ -1,3 +1,9 @@
+2012-08-07  Kevin Ryde  <user42@zip.com.au>
+
+       * woman.el (woman0-if): Quietly treat ".if v" as false (Bug#12109).
+       (woman-parse-numeric-value): On a bad .IP line, issue a warning
+       and continue processing (Bug#12110).
+
 2012-08-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/cperl-mode.el (cperl-mode): Yet another fix for
index 4a1e9a8..5933d59 100644 (file)
@@ -2531,7 +2531,8 @@ REQUEST is the invoking directive without the leading dot."
     (cond
      ;; ((looking-at "[no]") (setq c t))     ; accept n(roff) and o(dd page)
      ;; ((looking-at "[te]") (setq c nil))   ; reject t(roff) and e(ven page)
-     ((looking-at "[ntoe]")
+     ;; Per groff ".if v" is recognised as false (it means -Tversatec).
+     ((looking-at "[ntoev]")
       (setq c (memq (following-char) woman-if-conditions-true)))
      ;; Unrecognized letter so reject:
      ((looking-at "[A-Za-z]") (setq c nil)
@@ -3569,7 +3570,7 @@ expression in parentheses.  Leaves point after the value."
       (let (n)
        (forward-char)
        (setq n (woman-parse-numeric-arg))
-       (skip-syntax-forward " ")
+       (skip-syntax-forward " " (line-end-position))
        (if (eq (following-char) ?\))
            (forward-char)
          (WoMan-warn "Parenthesis confusion in numeric expression!"))
@@ -3621,7 +3622,7 @@ expression in parentheses.  Leaves point after the value."
                        (buffer-substring
                         (point)
                         (line-end-position)))
-           (skip-syntax-forward "^ ")
+           (skip-syntax-forward "^ " (line-end-position))
            0)
        (goto-char (match-end 0))
        ;; Check for scale factor: