This little snippet does the trick for me. However, you probably want to limit which files are included in schema mode. You can customize the when comment for this. And add the right close wig.
(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)
source share