 ;;----------------------------------------------------------------------------
 ;; Ruby
 ;;----------------------------------------------------------------------------
-(require 'ruby-electric)
+(autoload 'ruby-electric "ruby-electric" "Electric brackes/quotes/keywords for Ruby source" t)
 (setq ruby-electric-expand-delimiters-list nil)  ; Only use ruby-electric for adding 'end'
 (add-hook 'ruby-mode-hook
           (lambda () (ruby-electric-mode t)))

(add-auto-mode 'html-mode "\.rhtml$")


(require 'compile)
;; Jump to lines from Ruby Test::Unit stack traces in 'compile' mode
(add-to-list 'compilation-error-regexp-alist
             '("test[a-zA-Z0-9_]*([A-Z][a-zA-Z0-9_]*) \\[\\(.*\\):\\([0-9]+\\)\\]:" 1 2))
;; Jump to lines from Ruby stack traces in 'compile' mode
(add-to-list 'compilation-error-regexp-alist
             '("\\(.*?\\)\\([0-9A-Za-z_./\:-]+\\.rb\\):\\([0-9]+\\)" 2 3))
(setq compile-command "rake ")

(mmm-add-classes

  (require 'darcsum)
  (setq darcsum-whatsnew-switches "-l")

  (eval-after-load "grep"
  '(add-to-list 'grep-find-ignored-directories "_darcs")))


;;----------------------------------------------------------------------------
