(load "/etc/emacs/site-start.d/50ruby1.8-elisp.el") (require 'ri) (require 'inf-ruby) (defun ruby-xmp-region (reg-start reg-end) "Pipe the region through Ruby's xmp utility and replace the region with the result." (interactive "r") (shell-command-on-region reg-start reg-end "ruby -r xmp -n -e 'xmp($_, \"%l\t\t# %r\n\")'" t)) (global-set-key [(meta f10)] 'ruby-xmp-region)