Thread View: fj.editor.mule
9 messages
9 total messages
Started by Koyama Mituru
Thu, 08 Jun 2000 00:00
japanese man page on mule
Author: Koyama Mituru
Date: Thu, 08 Jun 2000 00:00
Date: Thu, 08 Jun 2000 00:00
14 lines
1072 bytes
1072 bytes
小山です。 Emacs 20.6 / Mule 4.0を使っていますが、日本語のman pageをmanコマ ンドで表示させると、重ね打の日本語がboldにならずに、 名^H^H名前^H^H前 と表示されてしまいます。これを回避する設定はあるでしょうか。 英数字はboldになります。Emacs 19.34 / Mule 2.3では、日本語もbold になります。 よろしくお願いします。 ---- 小山満 mkoya@sannet.ne.jp
Re: japanese man page on mule
Author: Katsumi Yamaoka
Date: Thu, 08 Jun 2000 00:00
Date: Thu, 08 Jun 2000 00:00
36 lines
2172 bytes
2172 bytes
>>>>> In <8hofae$bdi$1@news01ch.so-net.ne.jp>
>>>>> Shoichi Fukusaka <fukusaka@xa2.so-net.ne.jp> wrote:
小山さん>> 名^H^H名前^H^H前
もいもい> 僕は、Emacs 20.6 で以下のようにしています。
[...]
もいもい> (while (re-search-forward "\\(.\\)\\(\b\b\\1\\)+" nil t)
正規表現のこんな使い方ができるんですね。参考になります。
ところで "+" は必要なんでしょうか?
それから、
x* x-$ _^Hの_^H省_^H略_^H形
こういうのも整形する機能を追加してみました。
(defun Man-cooked-backspaces ()
(goto-char (point-min))
(while (re-search-forward "\\(.\\)\\(\b\b\\1\\)\\|_\b\\(.\\)" nil t)
(cond ((match-beginning 3)
(replace-match "\\3")
(if Man-fontify-manpage-flag
(put-text-property (1- (point)) (point)
'face Man-underline-face)))
(t
(replace-match "\\1")
(if Man-fontify-manpage-flag
(put-text-property (1- (point)) (point)
'face Man-overstrike-face)))))
(goto-char (point-min)))
(add-hook 'Man-cooked-hook 'Man-cooked-backspaces)
--
山岡 克美 <yamaoka@jpl.org>
Re: japanese man page on mule
Author: Katsumi Yamaoka
Date: Thu, 08 Jun 2000 00:00
Date: Thu, 08 Jun 2000 00:00
41 lines
2636 bytes
2636 bytes
>>>>> In <mpazoovmxr7.fsf@olive.kuee.kyoto-u.ac.jp>
>>>>> TSUCHIYA Masatoshi <tsuchiya@pine.kuee.kyoto-u.ac.jp> wrote:
山岡> それから、
山岡> x* x-$ _^Hの_^H省_^H略_^H形
山岡> こういうのも整形する機能を追加してみました。
半田さん>あれ?このパターンはオリジナルの man.el の
半田さん> (while (search-forward "_\b" nil t)
半田さん> (backward-delete-char 2)
半田さん> (put-text-property (point) (1+ (point)) 'face Man-underline-face))
半田さん>で吸収されませんか?
土屋さん> これは、元々は、
土屋さん> __^H^H省__^H^H略__^H^H形
土屋さん> という出力であったものが、半田さんが指摘されたコードによって
土屋さん> 整形されて、山岡さんが言われたような出力になっているのだと思
土屋さん> われます。
土屋さんのおっしゃる通りです。
;; 判明したのと同時に土屋さんの記事が届きました。:-)
というわけで、
(defun Man-fontify-manpage ()
[...]
(goto-char (point-min))
(while (search-forward "__\b\b" nil t)
(backward-delete-char 4)
(put-text-property (point) (1+ (point)) 'face Man-underline-face))
(goto-char (point-min))
(while (search-forward "_\b" nil t)
(backward-delete-char 2)
(put-text-property (point) (1+ (point)) 'face Man-underline-face))
といった感じのものを入れれば良いようです。
半田さん、よろしくお願いします。
--
Katsumi Yamaoka <yamaoka@jpl.org>
Re: japanese man page on mule
Author: Shoichi Fukusaka
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
27 lines
1317 bytes
1317 bytes
Koyama Mituru <mkoya@sannet.ne.jp> writes:
> 小山です。
>
> Emacs 20.6 / Mule 4.0を使っていますが、日本語のman pageをmanコマ
> ンドで表示させると、重ね打の日本語がboldにならずに、
>
> 名^H^H名前^H^H前
>
> と表示されてしまいます。これを回避する設定はあるでしょうか。
僕は、Emacs 20.6 で以下のようにしています。
(defun Man-cooked-2-backspace-code ()
(goto-char (point-min))
(while (re-search-forward "\\(.\\)\\(\b\b\\1\\)+" nil t)
(replace-match "\\1")
(if Man-fontify-manpage-flag
(put-text-property (1- (point)) (point) 'face Man-overstrike-face)))
(goto-char (point-min)))
(add-hook 'Man-cooked-hook 'Man-cooked-2-backspace-code)
--
Alias: もいもい
Name: 福坂 将一
E-mail: fukusaka@xa2.so-net.ne.jp
Re: japanese man page on mule
Author: Kenichi Handa
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
49 lines
2635 bytes
2635 bytes
In article <8hofae$bdi$1@news01ch.so-net.ne.jp>, Shoichi Fukusaka <fukusaka@xa2.so-net.ne.jp> writes:
> Koyama Mituru <mkoya@sannet.ne.jp> writes:
>> $B>.;3$G$9!#(B
>> $B!!(BEmacs 20.6 / Mule 4.0$B$r;H$C$F$$$^$9$,!"F|K\8l$N(Bman page$B$r(Bman$B%3%^(B
>> $B%s%I$GI=<($5$;$k$H!"=E$MBG$NF|K\8l$,(Bbold$B$K$J$i$:$K!"(B
>> $BL>(B^H^H$BL>A0(B^H^H$BA0(B
>> $B$HI=<($5$l$F$7$^$$$^$9!#$3$l$r2sHr$9$k@_Dj$O$"$k$G$7$g$&$+!#(B
> $BKM$O!"(BEmacs 20.6 $B$G0J2<$N$h$&$K$7$F$$$^$9!#(B
> (defun Man-cooked-2-backspace-code ()
> (goto-char (point-min))
> (while (re-search-forward "\\(.\\)\\(\b\b\\1\\)+" nil t)
> (replace-match "\\1")
> (if Man-fontify-manpage-flag
> (put-text-property (1- (point)) (point) 'face Man-overstrike-face)))
> (goto-char (point-min)))
$B8f;XE&$"$j$,$H$&$4$6$$$^$9!#(B Emacs 21 $B!J$^$@%W%j%F%9%H$b;O$^$C$F$$$^$;(B
$B$s$,!K$K$O0J2<$N%Q%C%A$rEv$F$F$*$-$^$9!#(B
$B!]!]!!$1$s$A$c$s!w#E#T#L(B
handa@etl.go.jp
Index: man.el
===================================================================
RCS file: /gd/gnu/cvsroot/emacs/lisp/man.el,v
retrieving revision 1.93
retrieving revision 1.94
diff -c -w -c -r1.93 -r1.94
*** man.el 2000/03/12 14:49:20 1.93
--- man.el 2000/06/09 00:42:39 1.94
***************
*** 693,699 ****
(backward-delete-char 2)
(put-text-property (1- (point)) (point) 'face Man-underline-face))
(goto-char (point-min))
! (while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t)
(replace-match "\\1")
(put-text-property (1- (point)) (point) 'face Man-overstrike-face))
(goto-char (point-min))
--- 693,699 ----
(backward-delete-char 2)
(put-text-property (1- (point)) (point) 'face Man-underline-face))
(goto-char (point-min))
! (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t)
(replace-match "\\1")
(put-text-property (1- (point)) (point) 'face Man-overstrike-face))
(goto-char (point-min))
Re: japanese man page on mule
Author: Kenichi Handa
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
21 lines
1463 bytes
1463 bytes
In article <yosuu2f4mpvy.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:
$B$b$$$b$$(B> (while (re-search-forward "\\(.\\)\\(\b\b\\1\\)+" nil t)
> $B@55,I=8=$N$3$s$J;H$$J}$,$G$-$k$s$G$9$M!#;29M$K$J$j$^$9!#(B
> $B$H$3$m$G(B "+" $B$OI,MW$J$s$G$7$g$&$+(B?
X^HX^HX $B$H$+$$$&%Q%?!<%s$X$NBP:v$G$7$g$&!#$G$b$3$&$$$&%Q%?!<%s8+$?$3$H(B
$B$J$$$G$9$,!#(B
> $B$=$l$+$i!"(B
> x* x-$ _^H$B$N(B_^H$B>J(B_^H$BN,(B_^H$B7A(B
> $B$3$&$$$&$N$b@07A$9$k5!G=$rDI2C$7$F$_$^$7$?!#(B
$B$"$l!)$3$N%Q%?!<%s$O%*%j%8%J%k$N(B man.el $B$N(B
(while (search-forward "_\b" nil t)
(backward-delete-char 2)
(put-text-property (point) (1+ (point)) 'face Man-underline-face))
$B$G5[<}$5$l$^$;$s$+!)(B
$B!]!]!!$1$s$A$c$s!w#E#T#L(B
handa@etl.go.jp
Re: japanese man page on mule
Author: TSUCHIYA Masatoshi
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
94 lines
4591 bytes
4591 bytes
--Multipart_Fri_Jun__9_10:47:08_2000-1
Content-Type: text/plain; charset=ISO-2022-JP
$BEZ20$G$9!#(B
>> On 09 Jun 2000 09:57:33 +0900
>> handa@etl.go.jp (Kenichi Handa) said as follows:
>> $B$=$l$+$i!"(B
>> x* x-$ _^H$B$N(B_^H$B>J(B_^H$BN,(B_^H$B7A(B
>> $B$3$&$$$&$N$b@07A$9$k5!G=$rDI2C$7$F$_$^$7$?!#(B
>$B$"$l!)$3$N%Q%?!<%s$O%*%j%8%J%k$N(B man.el $B$N(B
> (while (search-forward "_\b" nil t)
> (backward-delete-char 2)
> (put-text-property (point) (1+ (point)) 'face Man-underline-face))
>$B$G5[<}$5$l$^$;$s$+!)(B
$B$3$l$O!"85!9$O!"(B
__^H^H$B>J(B__^H^H$BN,(B__^H^H$B7A(B
$B$H$$$&=PNO$G$"$C$?$b$N$,!"H>ED$5$s$,;XE&$5$l$?%3!<%I$K$h$C$F@07A$5$l$F!"(B
$B;32,$5$s$,8@$o$l$?$h$&$J=PNO$K$J$C$F$$$k$N$@$H;W$o$l$^$9!#(B
$B$=$s$J$o$1$G!";d$O!"0J2<$N$h$&$K(B Man-fontify-manpage $B$r:FDj5A$7$F;H$C(B
$B$F$$$^$9!#(B
--Multipart_Fri_Jun__9_10:47:08_2000-1
Content-Type: text/plain; charset=US-ASCII
(defun Man-fontify-manpage () "\
Convert overstriking and underlining to the correct fonts.
Same for the ANSI bold and normal escape sequences."
(interactive)
(message "Please wait: making up the %s man page..." Man-arguments)
(goto-char (point-min))
(while (search-forward "\e[1m" nil t)
(delete-backward-char 4)
(put-text-property (point)
(progn (if (search-forward "\e[0m" nil 'move)
(delete-backward-char 4))
(point))
'face Man-overstrike-face))
(goto-char (point-min))
(while (re-search-forward "\\(__\b\b\\)\\(\\cj\\)" nil t)
(replace-match "\\2")
(put-text-property (1- (point)) (point) 'face Man-underline-face))
(goto-char (point-min))
(while (search-forward "_\b" nil t)
(backward-delete-char 2)
(put-text-property (point) (1+ (point)) 'face Man-underline-face))
(goto-char (point-min))
(while (search-forward "\b_" nil t)
(backward-delete-char 2)
(put-text-property (1- (point)) (point) 'face Man-underline-face))
(goto-char (point-min))
(while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t)
(replace-match "\\1")
(put-text-property (1- (point)) (point) 'face Man-overstrike-face))
(goto-char (point-min))
(while (re-search-forward "\\(\\cj\\)\\(\b\b\\1\\)+" nil t)
(replace-match "\\1")
(put-text-property (1- (point)) (point) 'face Man-overstrike-face))
(goto-char (point-min))
(while (re-search-forward "o\b\\+\\|\\+\bo" nil t)
(replace-match "o")
(put-text-property (1- (point)) (point) 'face 'bold))
(goto-char (point-min))
(while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t)
(replace-match "+")
(put-text-property (1- (point)) (point) 'face 'bold))
(Man-softhyphen-to-minus)
(message "%s man page made up" Man-arguments)))
--Multipart_Fri_Jun__9_10:47:08_2000-1
Content-Type: text/plain; charset=ISO-2022-JP
$B$=$l$+$i!"F|K\8l(B Man $B$KBP1~$9$k$N$G$7$?$i!"(B
(setq Man-see-also-regexp "SEE ALSO\\|$B4XO"9`L\(B"
Man-first-heading-regexp "^[ \t]*NAME$\\|^[ \t]*$BL>(B[$BA0>N(B]$\\|^[ \t]*No manual entry fo.*$"
Man-heading-regexp "^\\([A-Z$B!<$!(B-$B$s%!(B-$B%v0!(B-$Bt$(B][A-Z$B!<$!(B-$B$s%!(B-$B%v0!(B-$Bt$(B \t]+\\)$")
$B$H$$$&@_Dj$b$"$k$HNI$$$+$b$7$l$^$;$s!#(B
--
$BEZ20(B $B2mL-(B ( TSUCHIYA Masatoshi )
http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/
--Multipart_Fri_Jun__9_10:47:08_2000-1--
Re: japanese man page on mule
Author: Kenichi Handa
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
65 lines
3416 bytes
3416 bytes
In article <yosun1kwe321.fsf@jpl.org>, Katsumi Yamaoka <yamaoka@jpl.org> writes:
$BEZ20$5$s(B> $B$3$l$O!"85!9$O!"(B
$BEZ20$5$s(B> __^H^H$B>J(B__^H^H$BN,(B__^H^H$B7A(B
$BEZ20$5$s(B> $B$H$$$&=PNO$G$"$C$?$b$N$,!"H>ED$5$s$,;XE&$5$l$?%3!<%I$K$h$C$F(B
$BEZ20$5$s(B> $B@07A$5$l$F!";32,$5$s$,8@$o$l$?$h$&$J=PNO$K$J$C$F$$$k$N$@$H;W(B
$BEZ20$5$s(B> $B$o$l$^$9!#(B
$B$"!"J,$j$^$7$?!#(B
$BEZ20$5$s(B> $B$=$l$+$i!"F|K\8l(B Man $B$KBP1~$9$k$N$G$7$?$i!"(B
$BEZ20$5$s(B>
$BEZ20$5$s(B> (setq Man-see-also-regexp "SEE ALSO\\|$B4XO"9`L\(B"
$BEZ20$5$s(B> Man-first-heading-regexp "^[ \t]*NAME$\\|^[ \t]*$BL>(B[$BA0>N(B]$\\|^[ \t]*No manual entry fo.*$"
$BEZ20$5$s(B> Man-heading-regexp "^\\([A-Z$B!<$!(B-$B$s%!(B-$B%v0!(B-$Bt$(B][A-Z$B!<$!(B-$B$s%!(B-$B%v0!(B-$Bt$(B \t]+\\)$")
$BEZ20$5$s(B>
$BEZ20$5$s(B> $B$H$$$&@_Dj$b$"$k$HNI$$$+$b$7$l$^$;$s!#(B
$B$3$N<j$N(B localization $B$O(B Emacs $B$,(B gettext $BBP1~$K$J$k$^$G$*BT$A2<$5$$!#(B
> $B$H$$$&$o$1$G!"(B
> (defun Man-fontify-manpage ()
> [...]
> (goto-char (point-min))
> (while (search-forward "__\b\b" nil t)
> (backward-delete-char 4)
> (put-text-property (point) (1+ (point)) 'face Man-underline-face))
> (goto-char (point-min))
> (while (search-forward "_\b" nil t)
> (backward-delete-char 2)
> (put-text-property (point) (1+ (point)) 'face Man-underline-face))
> $B$H$$$C$?46$8$N$b$N$rF~$l$l$PNI$$$h$&$G$9!#(B
$B%^%k%A%P%$%HJ8;z$,$"$k$H$-$N$_=hM}$r$9$k$h$&$9$k$?$a!"@h$N=$@5$K2C$(!"(B
$B0J2<$N=$@5$rF~$l$h$&$H;W$$$^$9!#(B
$B!]!]!!$1$s$A$c$s!w#E#T#L(B
handa@etl.go.jp
Index: man.el
===================================================================
RCS file: /gd/gnu/cvsroot/emacs/lisp/man.el,v
retrieving revision 1.94
diff -c -w -c -r1.94 man.el
*** man.el 2000/06/09 00:42:39 1.94
--- man.el 2000/06/09 07:39:51
***************
*** 684,689 ****
--- 684,700 ----
(delete-backward-char 4))
(point))
'face Man-overstrike-face))
+ (if (< (buffer-size) (position-bytes (point-max)))
+ ;; Multibyte characters exist.
+ (progn
+ (goto-char (point-min))
+ (while (search-forward "__\b\b" nil t)
+ (backward-delete-char 4)
+ (put-text-property (point) (1+ (point)) 'face Man-underline-face))
+ (goto-char (point-min))
+ (while (search-forward "\b\b__" nil t)
+ (backward-delete-char 4)
+ (put-text-property (1- (point)) (point) 'face Man-underline-face))))
(goto-char (point-min))
(while (search-forward "_\b" nil t)
(backward-delete-char 2)
Re: japanese man page on mule
Author: Koyama Mituru
Date: Fri, 09 Jun 2000 00:00
Date: Fri, 09 Jun 2000 00:00
22 lines
1415 bytes
1415 bytes
小山です。 みなさん、どうもありがとうございます。 From: Shoichi Fukusaka <fukusaka@xa2.so-net.ne.jp> Subject: Re: japanese man page on mule Date: 09 Jun 2000 00:46:19 +0900 > (defun Man-cooked-2-backspace-code () > (goto-char (point-min)) > (while (re-search-forward "\\(.\\)\\(\b\b\\1\\)+" nil t) > (replace-match "\\1") > (if Man-fontify-manpage-flag > (put-text-property (1- (point)) (point) 'face Man-overstrike-face))) > (goto-char (point-min))) > > (add-hook 'Man-cooked-hook 'Man-cooked-2-backspace-code) 上の福坂さんの設定を~/.emacsに記述することで、日本語mam pageの表 示が正常になりました。 ---- 小山満 mkoya@sannet.ne.jp
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads