Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (31 sloc) 1.185 kb
5fcb34d @technomancy initial commit
authored
1 ;;; starter-kit-ruby.el --- Some helpful Ruby code
2 ;;
3 ;; Part of the Emacs Starter Kit
4
47667cb @technomancy Added some autoloads; updated README.
authored
5 ;; Until this makes it into ELPA:
6 (autoload 'ruby-mode "ruby-mode" "" t)
7 (autoload 'inf-ruby "inf-ruby" "" t)
8 (autoload 'run-ruby "inf-ruby" "" t)
9
12ac2f0 @technomancy Rearrange lisp and ruby helpers.
authored
10 (eval-after-load 'ruby-mode
11 '(progn
12 (require 'inf-ruby)
13 (require 'ruby-compilation)
5fcb34d @technomancy initial commit
authored
14
12ac2f0 @technomancy Rearrange lisp and ruby helpers.
authored
15 (define-key ruby-mode-map (kbd "RET") 'reindent-then-newline-and-indent)
16 (define-key ruby-mode-map (kbd "C-c l") "lambda")))
5fcb34d @technomancy initial commit
authored
17
18 (global-set-key (kbd "C-h r") 'ri)
19
20 ;; We never want to edit Rubinius bytecode
21 (add-to-list 'completion-ignored-extensions ".rbc")
22
838e8f9 @technomancy Clear compilation buffer in between test runs.
authored
23 ;; Clear the compilation buffer between test runs.
24 (eval-after-load 'ruby-compilation
25 '(progn
26 (defadvice ruby-do-run-w/compilation (before kill-buffer (name cmdlist))
27 (let ((comp-buffer-name (format "*%s*" name)))
28 (when (get-buffer comp-buffer-name)
29 (with-current-buffer comp-buffer-name
30 (delete-region (point-min) (point-max))))))
31 (ad-activate 'ruby-do-run-w/compilation)))
32
d7bdec6 @technomancy Rename some functions; remove mention of nxhtml until it's in ELPA.
authored
33 (add-hook 'ruby-mode-hook 'coding-hook)
38ac75b @technomancy Remove cheat binding, use coding-hook.
authored
34
5fcb34d @technomancy initial commit
authored
35 ;; TODO: set up ri
36 ;; TODO: electric
37 ;; TODO: flymake
38
39 (provide 'starter-kit-ruby)
40 ;; starter-kit-ruby.el ends here
Something went wrong with that request. Please try again.