Arc Forumnew | comments | leaders | submitlogin
Arc mode for emacs?
9 points by olifante 4682 days ago | 10 comments
I've been looking for an emacs Arc mode, but only found an old arc-mode.el created for archive processing. Does anyone have an emacs Arc mode? Failing that, which is best: lisp-mode or scheme-mode?


5 points by awm 4681 days ago | link

I've taken a stab at syntax highlighting based on scheme.el: http://zardoz.net/arc.el. Rudimentary so far, but gets most of the definition and control keywords.

Add to your .emacs:

(setq auto-mode-alist (append '(("\\.arc$" . arc-mode)) auto-mode-alist))

-----

3 points by comatose_kid 4681 days ago | link

Thanks. Incidentally, your .emacs advice didn't work for me (I'm on emacs 23.0.50.2 if that matters), but this did:

(autoload 'arc-mode "arc" "Arc mode." t)

(add-to-list 'auto-mode-alist '("\\.arc$" . arc-mode))

-----

2 points by olifante 4681 days ago | link

The "add-to-list" line for some reason is not enough to automatically activate the arc-mode for *.arc files, although I can activate it manually by doing M-x arc-mode.

By adding a variation of your snippet to my .emacs, I got arc-mode to activate automatically:

(add-to-list 'load-path "~/arc0") (autoload 'arc-mode "arc" "Arc mode." t) (setq auto-mode-alist (append '(("\\.arc$" . arc-mode)) auto-mode-alist))

-----

1 point by olifante 4681 days ago | link

Unfortunately it doesn't work for me. I get the following error: File mode specification error: (void-function arc-mode)

-----

1 point by olifante 4681 days ago | link

btw, I'm using Emacs.app 23.0.0

-----

1 point by olifante 4681 days ago | link

Solved.

-----

1 point by mnemonicsloth 4681 days ago | link

Shame on you and your domain. I would've been happy to forget that.

-----

6 points by apotheon 4682 days ago | link

How about Arc support in Vim? I seem to recall reading that Paul Graham uses Vim, so I imagine he probably has some tools specific to Arc using Vim in his developer toolbox.

-----

1 point by nex3 4682 days ago | link

I'll see if I can't hack something together using lisp- or scheme-mode with redefined keywords over the weekend. That is, unless someone beats me to it.

-----

3 points by olifante 4682 days ago | link

To automatically open *.arc files in scheme mode, add this to your .emacs:

(setq auto-mode-alist (append '(("\\.arc$" . scheme-mode)) auto-mode-alist))

-----