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 <path>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
>
>
>