[Top][All Lists]

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

Re: Hide text

From: Benjamin Rutt
Subject: Re: Hide text
Date: Sat, 21 Feb 2004 13:14:58 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

address@hidden (Fredrik Andersson) writes:

> I wonder if it is possible to hide part of text in Emacs?
> I would like to compress/expand the text inside a subroutine. 
> Before  compression:
> --------------------
> Function name(a,var z:boolean):Boolean;
> Var
>  x:Real;
>  z:Bollean;
>  x:=4;
>  z:=True;
> END;
> After compression:
> ------------------
> Function name(a,var z:boolean):Boolean;

If all you have in the file are functions, try enabling
outline-minor-mode, and customizing the buffer-local variable
outline-regexp to match your function name.  The idea is that you'd
match the function signature as a top-level outline header.

Maybe something like:

(setq outline-regexp "Function [a-z]+(.*):.*;$")

Then, try M-x hide-subtree on the function name line, and it will hide
the text between that line and the next function.

reply via email to

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