No subject


Fri Jan 15 15:06:42 UTC 2010


that the groff's output will be fixed any time soon.  So below is
a patch for man.el that removes these ^H:

=== modified file 'lisp/man.el'
--- lisp/man.el	2010-02-11 20:57:10 +0000
+++ lisp/man.el	2010-02-12 21:56:49 +0000
@@ -1105,6 +1105,11 @@ (defun Man-fontify-manpage ()
     (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)
@@ -1192,6 +1197,11 @@ (defun Man-cleanup-manpage (&optional in
 	))
   (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))

-- 
Juri Linkov
http://www.jurta.org/emacs/



More information about the pkg-perl-maintainers mailing list