# HG changeset patch # User Kenichi Handa # Date 877608187 0 # Node ID d0550e30957cc2e408152fe3eb4aea5ccefcacad # Parent 7ebe9039c4f9285c22d7cb43f66bf146b0a274df (Man-getpage-in-background): Bind inhibit-eol-conversion to t before calling start-process or call-process. (Man-softhyphen-to-minus): New function. If enable-multibyte-characters is non-nil, convert the code 0255 only when it is not a part of a multibyte characters. (Man-fontify-manpage): Call Man-softhyphen-to-minus. (Man-cleanup-manpage): Likewise. diff -r 7ebe9039c4f9 -r d0550e30957c lisp/man.el --- a/lisp/man.el Thu Oct 23 12:03:07 1997 +0000 +++ b/lisp/man.el Thu Oct 23 12:03:07 1997 +0000 @@ -640,6 +640,15 @@ (message "")) ))) +(defun Man-softhyphen-to-minus () + ;; \255 is some kind of dash in Latin-1. + (goto-char (point-min)) + (if enable-multibyte-characters + (while (search-forward "\255" nil t) + (if (= (preceding-char) ?\255) + (replace-match "-"))) + (while (search-forward "\255" nil t) (replace-match "-")))) + (defun Man-fontify-manpage () "Convert overstriking and underlining to the correct fonts. Same for the ANSI bold and normal escape sequences." @@ -673,9 +682,7 @@ (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+") (put-text-property (1- (point)) (point) 'face 'bold)) - ;; \255 is some kind of dash in Latin-1. - (goto-char (point-min)) - (while (search-forward "\255" nil t) (replace-match "-")) + (Man-softhyphen-to-minus) (message "%s man page made up" Man-arguments)) (defun Man-cleanup-manpage () @@ -699,9 +706,7 @@ )) (goto-char (point-min)) (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+")) - ;; \255 is some kind of dash in Latin-1. - (goto-char (point-min)) - (while (search-forward "\255" nil t) (replace-match "-")) + (Man-softhyphen-to-minus) (message "%s man page cleaned up" Man-arguments)) (defun Man-bgproc-sentinel (process msg)