From: narazaki@sdesun.ntt.jp (Narazaki Shuji)
Newsgroups: fj.kanakan.wnn
Subject: Re: Thank you (Re: Question: ',' and '.'.)
Date: 8 Sep 92 11:47:57 GMT
	<FMIKAMI.92Sep8134637@tani-relay.tani.mech.keio.ac.jp>
	<TACCHAN.92Sep8154619@topor.soft.flab.fujitsu.co.jp>
Distribution: fj
Organization: /usr1/narazaki/.organization

$BFj:j!w#N#T#T%=(B$B%U8&$H?=$7$^$9!#(B

In article <TACCHAN.92Sep8154619@topor.soft.flab.fujitsu.co.jp>
	tacchan@flab.fujitsu.co.jp (Tatsuo KONDO) writes: 
> :>  $B0lJ}!$Fj:j!w#N#T#T%=%U8&$5$s$+$i$O!$(B$BF1$8$/<ALd$NA0H>ItJ,$K4X$7$F!$$d$d(B
> :>  $B5,LO$,Bg$-$$%3!<%I$r%a!<%k$GAw(B$B$C$F$$$?$@$-$^$7$?!%$3$A$i$bK>$_$I$*$j$N(B
> :>  $BF0:n$r$7$^$7$?$,!$$3$A$i(B$B$O5U$K!$(B'Z,' $B$*$h$S(B 'Z.' $B$G(B '$B!"(B' $B$d(B '$B!#(B' $B$,$G$k(B
> :>  $B$N$GJXMx$G$9!%(B
> 
> $BFj:j(B$B$5$s!w#N#T#T%=%U%H8&$N5v2D$r$$$?$@$1$l$P$NOC$G$9$,!"$3$A$i$N%3!<%I(B
> $B$r8x3+$7$F$$$?$@$1$^$;$s$+!)(B

$B;d$,;0?@$5$s$KAw$C$?%3!<%I$r$3$N5-;v$N(B$B:G8e$K$D$1$^$7$?!#0J2<$O%a%$%k$K(B
$B=q$$$?>R2pJ8$G$9!#(B
$B!t(B smart$B$G$O$J$$$N(B$B$G%a%$%k$K$7$?$s$@$1$I$J!#(B/(-_-)

| $B$A$g$C$H$0$A$c$0$A$c$7$F$^$9$,!"0J2<(B$B$N%3!<%I$O$I$&$G$7$g$&$+!)(B
| $B5!G=$O(B
| 	$B!&%P%C%U%!$4$H$N!"$"$k$$$OA4$F$N(B$B%P%C%U%!$N%G%U%)!<%k%H$rA*$Y$k!#(B
| 	$B!&%P%C%U%!$4$H$K%3%^%s%I$G@ZBX$($i(B$B$l$k$h$&$K$9$k!#(B
| $B$H$$$&$b$N$G$9!#(B
| 
| $BNc$($P!"(B.emacs$B$K0J2<$N%3!<%I$rF~(B$B$l!"$=$N$&$7$m$K(B
| 	(toggle-fence:kutouten -1 'default)
| $B$HF~$l$F$*$1$P!"A4$F$N%P(B$B%C%U%!$G(B'$B!$(B'$B$H(B'$B!%(B'$B$,%G%U%)%k%H$K$J$j$^$9!#(B
| $B$^$?!"$"$k%P%C%U%!$G(B
| 	M-x toggle-fence:kutouten
| $B$H$9$l$P!"%P%$%s%I$r$=$N%P%C%U%!$@$1JQ$($k(B($B%H%0%k$9(B$B$k(B)$B$3$H$,$G$-$k$h(B
| $B$&$K$J$j$^$9!#(B($B?t(B)$B0z?t$rM?$($k$3$H$K$h$j!";XDjJQ99(B$B$b$G$-$^$9!#(B

$B!t(B $B%3%a%s%H$d4X?tL>$r>/$7JQ99$7$F$^$9!#$=$l$+$i:G8e$K$"(B$B$C$?%3%^%s%I$O(B
$B!t(B $B:#2s$NOC$H$OD>@\$K$O4X78$J$$$N$G>JN,$7$^$7$?!#(B > $B;0(B$B?@$5$s(B

$B$=$l$G$O!#(B
--
;;  $BFj:j(B $B=$Fs(B (NARAZAKI Shuji)     $B#N#T#T%=%U%H%&%'%"8&5f(B$B=j!JIpB"Ln!K(B
;;  Email: narazaki@nttslb.ntt.jp        $B%=%U%H%&%'%"3+H/5;=Q8&5fIt(B

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; $B%P%C%U%!$4$H$K6gFI(B$BE@$rJQ$($i$l$k$h$&$K$9$k!#(B

(make-variable-buffer-local 'egg:*mode-alist*)
;; $B%b!<%I$r(B$BJQ99$7$F$bK:$l$J$$$h$&$K!$(B*protected-local-variables*$B$K%W%C%7%e(B
;; $B$7$F$*$/!%(B
(if (not (memq 'egg:*mode-alist* *protected-local-variables*))
    (setq *protected-local-variables*
	  (cons 'egg:*mode-alist* *protected-local-variables*)))

;;; $B6gFIE@MQ$H%+%s%^%T%j%*%IMQ(B$B$NFs$D$N(Bmode-alist$B$rMQ0U$9$k!#(B
(defvar egg:*mode-alist-1* egg:*mode-alist*)
(defvar egg:*mode-alist-2* egg:*mode-alist*)

;; map$B$r6&M-$7$J$$(Begg:set-mode-map
(defun egg:set-mode-map (name map)
  (let ((place (assoc name egg:*mode-alist*)))
    (if place
	(progn
	  (setq egg:*mode-alist* (copy-alist egg:*mode-alist*))
	  (setcdr (assoc name egg:*mode-alist*) map))
      (progn (setq place (cons name map))
	     (setq egg:*mode-alist* (cons place egg:*mode-alist*))))))

;;; $B!V?7$7$$!W(B$B%^%C%W$r:n$k4X?t(B
(defun egg:copy-mode-map (name)
  (save-excursion 
    (let ((map (egg:get-mode-map name))
	  (buff (get-buffer-create "*EggModeDumpBuffer*"))
	  (result nil))
      (set-buffer buff)
      (let ((standard-output buff)
	    (buffer-read-only nil))
	(erase-buffer)
	(egg:dump-map map)
	(goto-char (point-min))
	(setq result (eval (read buff))) ; Yes, it's SLOW.
	(kill-buffer buff)
	result))))

;;; $B%+%s%^%T%j%*%IMQ$N%^%C%W$r:n$k(B
(egg:set-mode-map 
 "roma-kana"
 (let ((map (egg:copy-mode-map "roma-kana")))
   (set-key-action map ?, (list (list 'top "" map) "$B!$(B"))
   (set-key-action map ?. (list (list 'top "" map) "$B!%(B"))
   (set-key-action map ?Z (list (let ((map (action-get-map (get-key-action map ?Z))))
   (set-key-action map ?, (list (list 'top "Z" map) "$B!"(B"))
   (set-key-action map ?. (list (list 'top "Z" map) "$B!#(B"))
   map) nil))
    map))
(setq egg:*mode-alist-2* egg:*mode-alist*) 
(setq egg:*mode-alist* egg:*mode-alist-1*) 

(defun toggle-fence:kutouten (&optional arg set-default)
  "$B%U%'%s%9%b!<%I$G$N!V(B,$B!W$H!V(B.$B!W$N%P%$%s%I$rJQ99(B$B$9$k!#(B
$B%P%$%s%I$5$l$F$J$$J}$NJ8;z$O!V(BZ$B!W$,%W%l%U%#%C%/%9$K$J$k!#(B
$B$b$7(B$BBh(B1$B0z?t(B($B%*%W%7%g%J%k(B)$B$,@5?t$J$i$P!"!V(B,$B!W$r!V!"!W$K%P%$%s%I$9$k!#(B
$BIi$J(B$B$i$P!V(B,$B!W$r!V!$!W$K%P%$%s%I$9$k!#%<%m$J$i%H%0%k$9$k!#(B
$B$b$7Bh(B2$B0z?t(B($B%*%W(B$B%7%g%J%k(B)$B$,(Bnon-nil$B$J$i$P!"JQ998e$N%^%C%W$r%G%U%)!<%k%H(B
$B%^%C%W$K$9$k(B"
  (interactive "p")
  (let ((kutouten-p nil))
    (cond ((< arg 1) (setq kutouten-p nil))
	  ((= arg 1)
	   (if (string-equal 
		(action-get-output (get-key-action (egg:get-mode-map "roma-kana") 46))
		"$B!%(B")
	       (setq kutouten-p t)))
	  (t (setq kutouten-p t)))
    (if kutouten-p
	(setq egg:*mode-alist* egg:*mode-alist-1*)
      (setq egg:*mode-alist* egg:*mode-alist-2*)))
  (egg:goto-input-mode "roma-kana")
  (if set-default
      (progn
	(setq-default egg:*mode-alist* egg:*mode-alist*)
	(setq-default egg:*current-map* (egg:get-mode-map "roma-kana"))
	'done)))
Newsgroups: fj.kanakan.wnn