Ruby mode for Emacs

Hi all,

while I’m not new to Ruby, to Emacs I admit I am.
WHat I’d like to accomplish for the moment is to get the ruby mode for
Emacs working…

What I did so far:

I’ve downloaded Emacs @ ftp.gnu.org/gnu/windows/emacs/21.3/
And the basic things work as I expected (Can edit, save, load etc.)

Now I followed the instructions at

http://members.optushome.com.au/puyo/ruby.html#section:Ruby Downloads

…and run into this error message from the Emacs Lisp compiler:

Compiling file c:/Programme/emacs/lisp/progmodes/ruby-mode.el at Thu Apr
24 11:44:50 2003
** assignment to free variable add-log-current-defun-function

While compiling toplevel forms:
** reference to free variable font-lock-type-face
** assignment to free variable font-lock-variable-name-face
** assignment to free variable ruby-font-lock-syntactic-keywords
** The function `hilit-set-mode-patterns’ is not known to be defined.

Now what? (Apart from leraning Emacs’ Lisp, but that’s my exercise after
getting a bit more used to Emacs - which seems to be, er, promising to
say the least). (Found some sites using alltheweb and google;
unfortunately I don’t speak (read and/or write) Japanese…)

Any help available?

Cheers

Stephan

Hi,

…and run into this error message from the Emacs Lisp compiler:

These are all warnings, not errors.

Compiling file c:/Programme/emacs/lisp/progmodes/ruby-mode.el at Thu
Apr 24 11:44:50 2003
** assignment to free variable add-log-current-defun-function

This variable is made buffer-local. No problem.

While compiling toplevel forms:
** reference to free variable font-lock-type-face
** assignment to free variable font-lock-variable-name-face

Perhaps, just you didn’t load fon-lock.

** assignment to free variable ruby-font-lock-syntactic-keywords

This would be better to use defconst.

** The function `hilit-set-mode-patterns’ is not known to be defined.

It’s for old Emacsen, just ignore.

···

At Thu, 24 Apr 2003 19:08:01 +0900, Stephan Kämper wrote:


Nobu Nakada

Hi,

8< Lines of questions and advice snipped…

It’s for old Emacsen, just ignore.

Thanks a lot. After I’ve figured out that it may be a good idea to
activate the syntax highlighting (resp. to put >>(global-font-lock-mode
1)<< into my .emacs), it’s great.
Now I’ll “just” have to find out all the rest about Emacs. Can’t take
more than a couple of years I think…

Cheers

Stephan

···

nobu.nokada@softhome.net wrote:

Stephan Kämper wrote:

Hi,

8< Lines of questions and advice snipped…

It’s for old Emacsen, just ignore.

Thanks a lot. After I’ve figured out that it may be a good idea to
activate the syntax highlighting (resp. to put >>(global-font-lock-mode
1)<< into my .emacs), it’s great.
Now I’ll “just” have to find out all the rest about Emacs. Can’t take
more than a couple of years I think…

Cheers

Stephan

Yes, I love Emacs too.

To repeat a command use
ESC number
examples:
to move 10 lines down —> ESC 10 C-n
to insert 80 stars —> ESC 80 *

To save a macro use
C-x (
commands_sequence
C-x )
example:
To delete first and last word in current line —>

    C-x ( C-a M-d C-e M-Backspace C-n C-x )

to run macro use —> C-x e

Now if you want to delete first and last word in next 100 lines use just

ESC 100 C-x e

:slight_smile:

···

nobu.nokada@softhome.net wrote:


Szymon Drejewicz

Even better, rather than counting the lines, set mark on the first
line, move point to the last line and use:
M-x apply-macro-to-region-lines (i.e. M-x appl{Tab} using completion)

···

On Fri, 25 Apr 2003 14:17:22 +0200, Szymon Drejewicz drejewic@wsisiz.edu.pl wrote:

Stephan Kämper wrote:

nobu.nokada@softhome.net wrote:

Hi,

8< Lines of questions and advice snipped…

It’s for old Emacsen, just ignore.

Thanks a lot. After I’ve figured out that it may be a good idea to
activate the syntax highlighting (resp. to put >>(global-font-lock-mode
1)<< into my .emacs), it’s great.
Now I’ll “just” have to find out all the rest about Emacs. Can’t take
more than a couple of years I think…

Cheers

Stephan

Yes, I love Emacs too.

To repeat a command use
ESC number
examples:
to move 10 lines down —> ESC 10 C-n
to insert 80 stars —> ESC 80 *

To save a macro use
C-x (
commands_sequence
C-x )
example:
To delete first and last word in current line —>

   C-x ( C-a M-d C-e M-Backspace C-n C-x )

to run macro use —> C-x e

Now if you want to delete first and last word in next 100 lines use just

ESC 100 C-x e

:slight_smile:

Gordon Hartley gordonhartley@gordonhartley.com writes:

Even better, rather than counting the lines, set mark on the first
line, move point to the last line and use:
M-x apply-macro-to-region-lines (i.e. M-x appl{Tab} using completion)

I have been using Emacs for twenty years, and learn something new all the
time. Thanks, Gordon.

Jim

···


Jim Menard, jimm@io.com, http://www.io.com/~jimm/
“Power corrupts. Absolute power is kinda neat.” – Jeffrey Kaplan in r.h.o.d