tags:

views:

461

answers:

2

What kind of a hook should i use to collapse just functions in the class. I want to see the outline of the functions in the class but if i hook hide-all everything including the class is collapsed during open.

+1  A: 

This little snippet does the trick for me. However, you probably want to restrict which files have outline mode enabled. You can customize the commented out when statement to do that. And add the proper close paren.

(defun my-outline-trigger ()
  "enable outline mode and hide all the function bodies"
  ;; (when (member major-mode '(cc-mode emacs-lisp-mode)) ....)
  (outline-minor-mode)
  (hide-body))

(add-hook 'find-file-hooks 'my-outline-trigger)
Trey Jackson
+1  A: 

I use hideshow.el - it seems to work better for me.

Cheeso