Skip to content

Commit

Permalink
rewrite rust-mode to use font-lock-mode and emacs builtin syntax anal…
Browse files Browse the repository at this point in the history
…ysis
  • Loading branch information
graydon committed Jul 25, 2013
1 parent 330378d commit 581b3db
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 557 deletions.
14 changes: 0 additions & 14 deletions src/etc/emacs/Makefile

This file was deleted.

35 changes: 2 additions & 33 deletions src/etc/emacs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,8 @@ file:
(add-to-list 'load-path "/path/to/rust-mode/")
(require 'rust-mode)

Make sure you byte-compile the .el files first, or the mode will be
painfully slow. There is an included `Makefile` which will do it for
you, so in the simplest case you can just run `make` and everything
should Just Work.

If for some reason that doesn't work, you can byte compile manually,
by pasting this in your `*scratch*` buffer, moving the cursor below
it, and pressing `C-j`:

(progn
(byte-compile-file "/path/to/rust-mode/cm-mode.el" t)
(byte-compile-file "/path/to/rust-mode/rust-mode.el" t))

Rust mode will automatically be associated with .rs and .rc files. To
enable it explicitly, do `M-x rust-mode`.
Rust mode will automatically be associated with .rs files. To enable it
explicitly, do `M-x rust-mode`.

### package.el installation via Marmalade or MELPA

Expand Down Expand Up @@ -67,24 +54,6 @@ should upgrade in order to support installation from multiple sources.
The ELPA archive is deprecated and no longer accepting new packages,
so the version there (1.7.1) is very outdated.

#### Important

In order to have cm-mode properly initialized after compilation prior
to rust-mode.el compilation you will need to add these `advices` to
your init file or if you are a melpa user install the `melpa` package.

```lisp
(defadvice package-download-tar
(after package-download-tar-initialize activate compile)
"initialize the package after compilation"
(package-initialize))
(defadvice package-download-single
(after package-download-single-initialize activate compile)
"initialize the package after compilation"
(package-initialize))
```

#### Install rust-mode

From there you can install rust-mode or any other modes by choosing
Expand Down
194 changes: 0 additions & 194 deletions src/etc/emacs/cm-mode.el

This file was deleted.

Loading

1 comment on commit 581b3db

@catamorphism
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+ -- I don't really know emacs lisp, but I tried it and it worked!

Please sign in to comment.