On Fri, 2010-11-05 at 13:26 +0000, Richard Gomes wrote:
[ . . . ]
> I've installed scala-mode on Emacs by downloading the .el files from
> http://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/emacs/

It's probably much better if you use Bazaar, Mercurial or Git (or
Subversion I guess if you have to ;-) to get a branch / clone of the
Emacs part of the Subversion repository and then use symbolic links from
~/.emacs.d/ to all the .el files.  This way you can update the
branch/clone and Emacs automatically picks up the update. 

> I've also installed the code completion stuff, which is very well 
> explained in this article:
> http://www.scala-lang.org/node/354

I have never been convinced of all the code completion things that
people seem to rave about / can't do without in Eclipse, IntelliJ IDEA
and NetBeans.  For me they are intrusive popups that just slow me down.
But then I am just a grumpy old coder ;-)

> I added two lines to scala-mode-auto.el which makes Emacs understand 
> that Scala syntax coloring can be applied to .X10 files.
> 
>      (add-to-list 'auto-mode-alist '("\\.x10\\'" . scala-mode))
>      (modify-coding-system-alist 'file "\\.x10$"     'utf-8)

There are other ways of achieving this but if this works for you fine.

Personally I would avoid editing anything other than init.el or
custom.el files for this sort of configuration.  Editing a
distribution .el file means you can't just track their updates. 

> That's it!
> Now you can have a pretty good environment if you prefer prefer (or 
> need!) command line tools.
> 
> 
> Just in case you never extended Emacs configuration.
> This is my .emacs :

You might be best moving to using ~/.emacs.d/ instead of the .emacs
file.  For a start it avoids all the need to hassle with load paths.

>      ;; scala mode
>      (add-to-list 'load-path
> 
> "/opt/emacs.d/scala-mode")
> 
>      (require 'scala-mode-auto)
> 
>      ;; scala snippets
>      (setq yas/my-directory
> 
> "/opt/emacs.d/scala-mode/contrib/yasnippet/snippets")
> 
>      (yas/load-directory yas/my-directory)
>      (add-hook 'scala-mode-hook '(lambda () (yas/minor-mode-on) ))
> 
> 
> 
> ==> Adjust paths to your local settings.
> 
> 
> Have fun :)

That is the whole idea :-)

Bizarrely I just update to using Scala mode for X10 programming
yesterday!
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to