GNU bug report logs - #48724
Code collapsing and outline headings for elisp

Previous Next

Package: emacs;

Reported by: Christopher Dimech <dimech <at> gmx.com>

Date: Fri, 28 May 2021 21:00:01 UTC

Severity: wishlist

Full log


Message #8 received at 48724 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Christopher Dimech <dimech <at> gmx.com>
Cc: 48724 <at> debbugs.gnu.org
Subject: Re: bug#48724: Code collapsing and outline headings for elisp
Date: Sun, 30 May 2021 00:57:31 +0300
> Currently, outline-minor-mode has the capability to treat "defun" constructs
> as heading, allowing one to choose to hide some code from view by collapsing
> the region of code.  It would be beneficial for the actual major mode itself
> (i.e. emacs-lisp-mode) to handle the code collapsing, leaving the code highlighting
> intact.  Code collapsing could also be extended beyond not only collapsing
> functions and variables ((defun, defvar), but also to additional constructs that could
> be indented (e.g. lists '(...), let, let*, pcase) and other constructs users could
> find useful (e.g. if, when, ).
>
> And for outline-minor-mode, the mode could then be used to further enhance the structuring
> of larger chunks of code (e.g. a collection of functions) using outline headings.  Outlining
> would then be a separate capability different from code collapsing.

Currently everything is customizable in outline-minor-mode by just
two variables: outline-regexp and outline-level.  So when necessary,
emacs-lisp-mode could provide an option that will set different values
of these variables, one of which could set outline-regexp to a regexp
that matches: lists, '(...), let, let*, pcase, if, when, etc…




This bug report was last modified 4 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.