From 91e3333fc5d5a23ee763a5f0a3440c27eb62a6f1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 14 Feb 2010 02:20:31 +0200 Subject: [PATCH] * man.el (Man-fontify-manpage, Man-cleanup-manpage): Remove remaining ^H with their preceding chars. (Bug#5566) --- lisp/ChangeLog | 5 +++++ lisp/man.el | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b764b3a452..9590f800640 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-02-14 Juri Linkov + + * man.el (Man-fontify-manpage, Man-cleanup-manpage): + Remove remaining ^H with their preceding chars. (Bug#5566) + 2010-02-13 Glenn Morris * simple.el (transpose-subr): Give it a doc-string. 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)) -- 2.39.5