Fix two woman bugs.

* 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
This commit is contained in:
Kevin Ryde 2012-08-07 11:57:05 +08:00 committed by Chong Yidong
parent 9f6f48455f
commit 54eea61817
2 changed files with 10 additions and 3 deletions

View 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

View 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: