aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Ryde2012-08-07 11:57:05 +0800
committerChong Yidong2012-08-07 11:57:05 +0800
commit54eea618176c6aaa8d2d7b60496547d9312a49b4 (patch)
tree323e5c1ae91b5d0ee8d7a8821f9307ea8a3950cd
parent9f6f48455f7d25e5cc2d50485d98ff3af43946a2 (diff)
downloademacs-54eea618176c6aaa8d2d7b60496547d9312a49b4.tar.gz
emacs-54eea618176c6aaa8d2d7b60496547d9312a49b4.zip
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
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/woman.el7
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 @@
12012-08-07 Kevin Ryde <user42@zip.com.au>
2
3 * woman.el (woman0-if): Quietly treat ".if v" as false (Bug#12109).
4 (woman-parse-numeric-value): On a bad .IP line, issue a warning
5 and continue processing (Bug#12110).
6
12012-08-06 Stefan Monnier <monnier@iro.umontreal.ca> 72012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * progmodes/cperl-mode.el (cperl-mode): Yet another fix for 9 * 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."
2531 (cond 2531 (cond
2532 ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page) 2532 ;; ((looking-at "[no]") (setq c t)) ; accept n(roff) and o(dd page)
2533 ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page) 2533 ;; ((looking-at "[te]") (setq c nil)) ; reject t(roff) and e(ven page)
2534 ((looking-at "[ntoe]") 2534 ;; Per groff ".if v" is recognised as false (it means -Tversatec).
2535 ((looking-at "[ntoev]")
2535 (setq c (memq (following-char) woman-if-conditions-true))) 2536 (setq c (memq (following-char) woman-if-conditions-true)))
2536 ;; Unrecognized letter so reject: 2537 ;; Unrecognized letter so reject:
2537 ((looking-at "[A-Za-z]") (setq c nil) 2538 ((looking-at "[A-Za-z]") (setq c nil)
@@ -3569,7 +3570,7 @@ expression in parentheses. Leaves point after the value."
3569 (let (n) 3570 (let (n)
3570 (forward-char) 3571 (forward-char)
3571 (setq n (woman-parse-numeric-arg)) 3572 (setq n (woman-parse-numeric-arg))
3572 (skip-syntax-forward " ") 3573 (skip-syntax-forward " " (line-end-position))
3573 (if (eq (following-char) ?\)) 3574 (if (eq (following-char) ?\))
3574 (forward-char) 3575 (forward-char)
3575 (WoMan-warn "Parenthesis confusion in numeric expression!")) 3576 (WoMan-warn "Parenthesis confusion in numeric expression!"))
@@ -3621,7 +3622,7 @@ expression in parentheses. Leaves point after the value."
3621 (buffer-substring 3622 (buffer-substring
3622 (point) 3623 (point)
3623 (line-end-position))) 3624 (line-end-position)))
3624 (skip-syntax-forward "^ ") 3625 (skip-syntax-forward "^ " (line-end-position))
3625 0) 3626 0)
3626 (goto-char (match-end 0)) 3627 (goto-char (match-end 0))
3627 ;; Check for scale factor: 3628 ;; Check for scale factor: