From 54eea618176c6aaa8d2d7b60496547d9312a49b4 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Tue, 7 Aug 2012 11:57:05 +0800 Subject: [PATCH] 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 --- lisp/ChangeLog | 6 ++++++ lisp/woman.el | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d915a39814..d0d4a31ab65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-08-07 Kevin Ryde + + * 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 * progmodes/cperl-mode.el (cperl-mode): Yet another fix for 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: -- 2.39.2