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

5 comments on commit 581b3db

@bors
Copy link
Contributor

@bors bors commented on 581b3db Jul 26, 2013

Choose a reason for hiding this comment

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

saw approval from catamorphism
at graydon@581b3db

@bors
Copy link
Contributor

@bors bors commented on 581b3db Jul 26, 2013

Choose a reason for hiding this comment

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

merging graydon/rust/emacs-mode-rewrite = 581b3db into auto

@bors
Copy link
Contributor

@bors bors commented on 581b3db Jul 26, 2013

Choose a reason for hiding this comment

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

graydon/rust/emacs-mode-rewrite = 581b3db merged ok, testing candidate = 4c4cf00

@bors
Copy link
Contributor

@bors bors commented on 581b3db Jul 26, 2013

Choose a reason for hiding this comment

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

fast-forwarding master to auto = 4c4cf00

Please sign in to comment.