summaryrefslogtreecommitdiff
path: root/lisp/woman.el
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2012-08-07 11:57:05 +0800
committerChong Yidong <cyd@gnu.org>2012-08-07 11:57:05 +0800
commit54eea618176c6aaa8d2d7b60496547d9312a49b4 (patch)
tree323e5c1ae91b5d0ee8d7a8821f9307ea8a3950cd /lisp/woman.el
parent9f6f48455f7d25e5cc2d50485d98ff3af43946a2 (diff)
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
Diffstat (limited to 'lisp/woman.el')
-rw-r--r--lisp/woman.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/woman.el b/lisp/woman.el
index 4a1e9a83efa..5933d593aa5 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -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: