[REBOL] emacs colors Re:(5)

2000-05-17 Thread jeff



   Howdy, Fredrik 

  ( and other brothers and sisters of the EMACS faith (-: ): 


  Okay, you may want to byte-compile the file first:

   M-x byte-compile-file

  This will produce "rebol.elc". Then you might put this in
  your home directory.  You may need to add your home
  directory to the search path. Add this to your .emacs:

(setq load-path (cons "/path/to/your-home-dir" load-path))

  After that you can add this line:

(load "rebol") 

  To associate the mode with .r files add:

(setq auto-mode-alist
  (cons '("\\.r$" . rebol-mode)  
auto-mode-alist))



Now here's a real handy piece of elisp to rebol glue code:


(defun go-rebol ()
  (interactive)
  (progn 
(mark-whole-buffer)
(write-region (buffer-string) 0 "/path/to/somewhere/.temp.r")
(switch-to-buffer (process-buffer (setq proc (start-process "subrebol" "subrebol" 
"/path/to/rebol" "-s" 
"/path/to/somewhere/.temp.r"
(comint-mode)
)
)
(global-set-key "\M-e" (quote go-rebol))


   ;- changing all the paths to where ever they are.
 
   Now you can be in a buffer making a script, type M-e and it
   will pass your script to rebol and start it in a separate
   buffer.

   Good luck!


   If any one out there has some experience dealing with emacs
   modes, the rebol.el emacs mode could use your help.  There
   are still a couple things wrong with the way it parses
   strings in particular and where it places close square
   brackets. 


   -jeff

> src> print emacs-mode: read http://www.rebol.org/rebol.el
> 
> Thank you.
> 
> Now  I'm not this good at  emacs, the program is very good,
> but i cannot figure out where  to put the rebol.el file and
> how to include/start it in emacs.
> 
> I tried:   ESC-x load-file rebol.el (add-hook
> 'rebol-mode-hook 'turn-on-font-lock)
> 
> neither one works, may be because this isn't the right way?
> 
> Regards, Fredrik Bergstrom
> 
> --
> 
> [ PowerWebs have  a  good Webhotel  for  everyone, supports
> Rebol to =) ] [ www.powerwebs.se ]
> 
> PowerWebs AB Wåxnäsgatan 10 S-653  40 Karlstad Sweden  Tel:
> +46-(0)54-103377 Fax: +46-(0)54-103376 ICQ# 7654213
> 
> 
> 




[REBOL] emacs colors Re:(5)

2000-05-17 Thread sterling


Here's what I've got...
The first line insures that where I put my rebol.el file is in the
load path, it loads the file, requires it (whatever that's worth I
don't know exactly), then adds the hook and associates .r files.

(setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path))
(load "rebol")
(require 'rebol)
(add-hook 'rebol-mode-hook (lambda () (font-lock-mode 1)))
(setq auto-mode-alist
  (cons (cons "\\.r\\'" 'rebol-mode) auto-mode-alist))
))

Sterling

> Hello sterling,
> 
> Tuesday, May 16, 2000, 7:15:44 PM, you wrote:
> 
> 
> src> print emacs-mode: read http://www.rebol.org/rebol.el
> 
> Thank you.
> 
> Now I'm not this good at emacs, the program is very good, but i
> cannot figure out where to put the rebol.el file and how to
> include/start it in emacs.
> 
> I tried:
> ESC-x load-file rebol.el
> (add-hook 'rebol-mode-hook 'turn-on-font-lock)
> 
> neither one works, may be because this isn't the right way?
> 
> Regards, Fredrik Bergstrom