help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to auto hide all functions when open a source file


From: Thien-Thi Nguyen
Subject: Re: How to auto hide all functions when open a source file
Date: Thu, 22 May 2008 18:16:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

() "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
() Sun, 11 May 2008 21:52:23 +0100

   (add-hook 'hs-minor-mode-hook '(lambda () (hs-hide-all)))

The hideshow.el commentary sez:

;; Some languages (e.g., Java) are deeply nested, so the normal behavior
;; of `hs-hide-all' (hiding all but top-level blocks) results in very
;; little information shown, which is not very useful.  You can use the
;; variable `hs-hide-all-non-comment-function' to implement your idea of
;; what is more useful.  For example, the following code shows the next
;; nested level in addition to the top-level:
;;
;;   (defun ttn-hs-hide-level-1 ()
;;     (hs-hide-level 1)
;;     (forward-sexp 1))
;;   (setq hs-hide-all-non-comment-function 'ttn-hs-hide-level-1)

This was suggested a hideshow user; i haven't tested it personally.

thi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]