aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-10-23 12:03:07 +0000
committerKenichi Handa1997-10-23 12:03:07 +0000
commit6cb92c3a637747ae7e5ee18c656be158fafd84a2 (patch)
tree9affce25482e015c51d4e34fd277cd0e410bc429
parent34c0365b517bf8113fd6fa5e6c2d20dabd862279 (diff)
downloademacs-6cb92c3a637747ae7e5ee18c656be158fafd84a2.tar.gz
emacs-6cb92c3a637747ae7e5ee18c656be158fafd84a2.zip
(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.
-rw-r--r--lisp/man.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/man.el b/lisp/man.el
index d40fc2fe8a4..a05e2462e4b 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -640,6 +640,15 @@ See the variable `Man-notify-method' for the different notification behaviors."
640 (message "")) 640 (message ""))
641 ))) 641 )))
642 642
643(defun Man-softhyphen-to-minus ()
644 ;; \255 is some kind of dash in Latin-1.
645 (goto-char (point-min))
646 (if enable-multibyte-characters
647 (while (search-forward "\255" nil t)
648 (if (= (preceding-char) ?\255)
649 (replace-match "-")))
650 (while (search-forward "\255" nil t) (replace-match "-"))))
651
643(defun Man-fontify-manpage () 652(defun Man-fontify-manpage ()
644 "Convert overstriking and underlining to the correct fonts. 653 "Convert overstriking and underlining to the correct fonts.
645Same for the ANSI bold and normal escape sequences." 654Same for the ANSI bold and normal escape sequences."
@@ -673,9 +682,7 @@ Same for the ANSI bold and normal escape sequences."
673 (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) 682 (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t)
674 (replace-match "+") 683 (replace-match "+")
675 (put-text-property (1- (point)) (point) 'face 'bold)) 684 (put-text-property (1- (point)) (point) 'face 'bold))
676 ;; \255 is some kind of dash in Latin-1. 685 (Man-softhyphen-to-minus)
677 (goto-char (point-min))
678 (while (search-forward "\255" nil t) (replace-match "-"))
679 (message "%s man page made up" Man-arguments)) 686 (message "%s man page made up" Man-arguments))
680 687
681(defun Man-cleanup-manpage () 688(defun Man-cleanup-manpage ()
@@ -699,9 +706,7 @@ Same for the ANSI bold and normal escape sequences."
699 )) 706 ))
700 (goto-char (point-min)) 707 (goto-char (point-min))
701 (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+")) 708 (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) (replace-match "+"))
702 ;; \255 is some kind of dash in Latin-1. 709 (Man-softhyphen-to-minus)
703 (goto-char (point-min))
704 (while (search-forward "\255" nil t) (replace-match "-"))
705 (message "%s man page cleaned up" Man-arguments)) 710 (message "%s man page cleaned up" Man-arguments))
706 711
707(defun Man-bgproc-sentinel (process msg) 712(defun Man-bgproc-sentinel (process msg)