From: Mark Slagell Date: 2002-07-07T22:53:35+09:00 Subject: Re: hideshow mode for ruby-mode.el > > >>>The `hideshow' Emacs minor mode lets you hide the content of a >>> >>> >>block >> >> >>>of code and only see the first line >>> There is also emacs' selective-display facility, which shows or hides based on the existing indentation. So it basically borrows the logic of ruby-mode or whatever. --Mark ;; ~/.emacs excerpt ;; Use function keys f9 through f12 as a 'zoom' control. (defun zoom-way-out() (interactive) (set-selective-display 0)) (defun zoom-way-in() (interactive) (set-selective-display 2)) (defun zoom-out() (interactive) (set-selective-display (if selective-display (if (or (= selective-display 0) (= selective-display 10)) 0 (+ selective-display 2)) 0))) (defun zoom-in() (interactive) (set-selective-display (if selective-display (if (= selective-display 0) 10 (if (= selective-display 2) 2 (- selective-display 2))) 10))) (global-set-key [f9] 'zoom-way-out) (global-set-key [f10] 'zoom-out) (global-set-key [f11] 'zoom-in) (global-set-key [f12] 'zoom-way-in)