home *** CD-ROM | disk | FTP | other *** search
- ; levels.cmd, MicroEmacs, 12 Nov 89, S.D. Maley
- ; collapse and expand display
- ; of lines between matching "fences"
- ;
- ; NOTE: you must be on a fence char when you invoke collapse
- ;
- store-procedure collapse
- set %bfl $curline
- goto-matching-fence
- !if &less $curline %bfl
- set %efl %bfl
- !else
- set %efl $curline
- goto-matching-fence
- !endif
- update-screen
- set %whalf &div $wline 2
- !if &less %whalf $cwline
- &sub $cwline %whalf move-window-down
- !endif
- split-current-window
- !if &less $cwline $wline
- &sub $wline $cwline shrink-window
- !endif
- next-window
- set $curline %efl
- &sub $cwline 1 move-window-down
- !endm
-
- store-procedure expand
- delete-window
- set $curline %bfl
- !endm
- ;
- macro-to-key expand M-FNC ;-- <Meta> <Ins>: expand
- macro-to-key collapse M-FND ;-- <Meta> <Del>
-