Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Remove hideshow integration
Browse files Browse the repository at this point in the history
  • Loading branch information
kastiglione committed Feb 29, 2012
1 parent b4c79b6 commit 00d9934
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
35 changes: 0 additions & 35 deletions rails-ruby.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,41 +54,6 @@ See the variable `align-rules-list' for more details.")
(dolist (it ruby-align-rules-list)
(add-to-list 'align-rules-list it))

;; hideshow ruby support

(defun display-code-line-counts (ov)
(when (eq 'code (overlay-get ov 'hs))
(overlay-put ov 'face 'font-lock-comment-face)
(overlay-put ov 'display
(format " ... %d lines"
(count-lines (overlay-start ov)
(overlay-end ov))))))

(eval-after-load "hideshow"
(unless 'hs-set-up-overlay
(setq hs-set-up-overlay 'display-code-line-counts)))

(add-hook 'hs-minor-mode-hook
(lambda ()
(unless hs-set-up-overlay
(setq hs-set-up-overlay 'display-code-line-counts))))

(defun ruby-hs-minor-mode (&optional arg)
(interactive)
(require 'hideshow)
(unless (assoc 'ruby-mode hs-special-modes-alist)
(setq
hs-special-modes-alist
(cons (list 'ruby-mode
"\\(def\\|do\\)"
"end"
"#"
(lambda (&rest args) (ruby-end-of-block))
;(lambda (&rest args) (ruby-beginning-of-defun))
)
hs-special-modes-alist)))
(hs-minor-mode arg))

;; other stuff

(defun ruby-newline-and-indent ()
Expand Down
1 change: 0 additions & 1 deletion rails.el
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ necessary."
(lambda ()
(when (rails-project:root)
(require 'rails-ruby)
(ruby-hs-minor-mode t)
(imenu-add-to-menubar "IMENU")
(if rails-indent-and-complete
(local-set-key (if rails-use-another-define-key
Expand Down

0 comments on commit 00d9934

Please sign in to comment.