dongbin / my_emacs

Everybody have his own emacs, why not me?

my_emacs / ruby.el
100644 18 lines (14 sloc) 0.383 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(require 'hideshow)
 
(defun ruby-custom-setup ()
; [other stuff omitted...]
  (add-to-list 'hs-special-modes-alist
               '(ruby-mode
                 "\\(def\\|do\\)"
                 "end"
                 "#"
                 (lambda (arg) (ruby-end-of-block))
                 nil
                 ))
  (hs-minor-mode t)
)
 
(add-hook 'ruby-mode-hook 'ruby-custom-setup)