Skip to content

Commit

Permalink
auto merge of #8031 : graydon/rust/emacs-mode-rewrite, r=catamorphism
Browse files Browse the repository at this point in the history
The previous mode did a lot of very manual char-at-a-time parsing and was quite fragile and difficult to maintain. I talked to Marijn and he suggested I'd have better luck just rewriting it from scratch. This is the result of that effort; it seems to be faster, a bit easier on the eyes and more-or-less as well behaved when indenting. The algorithm is a bit different I suspect (it was hard to tell the previous one) but I tried to keep it simple and pleasant-looking.
  • Loading branch information
bors committed Jul 26, 2013
2 parents 5109ce6 + 581b3db commit 4c4cf00
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

0 comments on commit 4c4cf00

Please sign in to comment.