On Wed, Dec 18, 2002 at 07:53:57AM +0900, Massimiliano Mirra wrote:
> On Thu, Dec 05, 2002 at 05:57:46PM +0900, Harry Ohlsen wrote:
> 
> > I seem to recall someone wote some macros to execute Ruby code in
> > vim ... 
> 
> Now don't think that I'm trying to entice anyone to the dark side, but
> with Emacs ;-) I'm using a nice little snippet in my ~/.emacs that
> would be perfect for nubies:
> 
> (defun ruby-eval-buffer () (interactive)
>   "Evaluate the buffer with ruby."
>   (shell-command-on-region (point-min) (point-max) "ruby"))

Cool!  Thanks for the snippet.  I've added that and tweaked your lisp
a little to make a buffer syntax check function too.

(defun ruby-check-buffer () (interactive)
  "Evaluate the buffer with ruby syntax warn and check."
  (shell-command-on-region (point-min) (point-max) "ruby -wc"))

-- 
Alan Chen
Digikata Computing
http://digikata.com