[Top][All Lists]

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

Re: Code folding in Emacs.

From: Emanuel Berg
Subject: Re: Code folding in Emacs.
Date: Sun, 10 Oct 2021 16:29:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Hongyi Zhao wrote:

> (defun set-selective-display-dlw (&optional level)
>   "Fold text indented same of more than the cursor.
> If level is set, set the indent level to LEVEL.
> If 'selective-display' is already set to LEVEL, clicking
> F5 again will unset 'selective-display' by setting it to 0."
>   (interactive "P")
>   (if (eq selective-display (1+ (current-column)))
>       (set-selective-display 0)
>     (set-selective-display (or level (1+ (current-column))))))
> The above code trick seems very simple, but it works for
> many languages. So I recommend it here.

Good Lisp to whoever wrote it ...

underground experts united

reply via email to

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