summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2010-02-14 02:20:31 +0200
committerJuri Linkov <juri@jurta.org>2010-02-14 02:20:31 +0200
commit91e3333fc5d5a23ee763a5f0a3440c27eb62a6f1 (patch)
treed3e4a595a300c151e501ca3ce9ff0cc9685173c3 /lisp/man.el
parent360206424705f20e51a77588c82c3bb698452fc9 (diff)
downloademacs-91e3333fc5d5a23ee763a5f0a3440c27eb62a6f1.tar.gz
* man.el (Man-fontify-manpage, Man-cleanup-manpage):
Remove remaining ^H with their preceding chars. (Bug#5566)
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/man.el b/lisp/man.el
index dd64fbda574..a92caf49ec1 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1087,6 +1087,11 @@ Same for the ANSI bold and normal escape sequences."
(while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t)
(replace-match "+")
(put-text-property (1- (point)) (point) 'face 'bold))
+ ;; When the header is longer than the manpage name, groff tries to
+ ;; condense it to a shorter line interspered with ^H. Remove ^H with
+ ;; their preceding chars (but don't put Man-overstrike-face). (Bug#5566)
+ (goto-char (point-min))
+ (while (re-search-forward ".\b" nil t) (backward-delete-char 2))
(goto-char (point-min))
;; Try to recognize common forms of cross references.
(Man-highlight-references)
@@ -1174,6 +1179,11 @@ script would have done them."
))
(goto-char (point-min))
(while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+"))
+ ;; When the header is longer than the manpage name, groff tries to
+ ;; condense it to a shorter line interspered with ^H. Remove ^H with
+ ;; their preceding chars (but don't put Man-overstrike-face). (Bug#5566)
+ (goto-char (point-min))
+ (while (re-search-forward ".\b" nil t) (backward-delete-char 2))
(Man-softhyphen-to-minus)
(message "%s man page cleaned up" Man-arguments))