Newsgroups: fj.editor.emacs,fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!jaist-news!cs.titech!wnoc-tyo-news!news.u-tokyo.ac.jp!train.ad.jp!cs.gunma-u!news
From: miura@symb.cs.gunma-u.ac.jp (Miura Kinya)
Subject: Re: [Q]How to make 'eval-current-buffer-by-perl'?
Message-ID: <CGo3ys.HH8@cs.gunma-u.ac.jp>
Sender: news@cs.gunma-u.ac.jp (News)
Nntp-Posting-Host: symb.cs.gunma-u.ac.jp
Reply-To: miura@cs.gunma-u.ac.jp
Organization: Dept. Computer Science, Gunma Univ.
References: <1993Nov17.013051.4067@syrinx.ntt.jp>
Distribution: fj
Date: Thu, 18 Nov 1993 03:20:52 GMT
Lines: 38
Xref: galaxy.trc.rwcp.or.jp fj.editor.emacs:4177 fj.lang.perl:66
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=66&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

from article <1993Nov17.013051.4067@syrinx.ntt.jp>,
by nakawtse@ciladb.ntt.jp (Hidekazu Nakawatase):
> $B!!(Bcurrent-buffer$B$NFbMF$r(Bperl$B$KEO$7$FI>2A$5$;$k$h$&$J(B
> $B!!%W%m%0%i%`$r:n$C$F8+$?$$$N$G$9$,!"%9%-%k$,L$=O$J$b$N$G(B
> $B!!$h$/$o$+$j$^$;$s!#(B

$B$I$3$+$K$9$G$K$"$j$=$&$J5$$O$7$^$9$,(B (perl-mode$B$H$+(B)

$B$3$s$J$N$G$I$&$G$9$+(B?

(defvar perl-command "perl")

(defun eval-current-buffer-by-perl ()
  (interactive)
  (eval-region-by-perl (dot-min) (dot-max)))

(defun eval-region-by-perl (begin end)
  (interactive "r")
  (shell-command-on-region begin end perl-command))

call-process-region $B$r;H$($P!$$b$C$H6E$C$?$3$H$b$G$-$^$9$,!$$3$l$G$b==J,(B
$B<BMQ$K$J$k$H;W$$$^$9!%(B

> $B!!(Bcurrent-buffer$B$r$$$C$?$s%U%!%$%k$K%;!<%V$7$F(B
> $B!!(Bperl file $B$r8F$V$N$O$G$-$=$&$J$N$G$9$,!"!"(B

$B$3$NJ}K!$O!$(Bwrite-file $B$H(B shell-command $B$rAH$_9g$o$;$l$P$G$-$=$&!%(B
tex-mode.el $BCf$N!$(BTeX-buffer, TeX-region $B$G$d$C$F$$$k$h$&$JJ}K!$b$"$j$^(B
$B$9$1$I!%(B

$B8f;29M$^$G$K!%(B
--
        $B;01:6VLi(B
      Miura Kin'ya [ `Miura' is my family name ]
  e-mail: miura@cs.gunma-u.ac.jp



