emacs-devel
[Top][All Lists]
Advanced

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

Re: Regarding outline headings in emacs-lisp libraries


From: Stefan Monnier
Subject: Re: Regarding outline headings in emacs-lisp libraries
Date: Fri, 17 Jul 2020 18:27:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Jonas,

> Now, I agree that it makes sense to do it that way but the problem is
> that it only does so in theory, in practice this approach comes with
> several annoyances.

[ Note: I use `outline-minor-mode` systematically in all my Elisp files.  ]

I don't have a strong opinion on this, but FWIW, I have a slight
preference for the ";;;;" version over the ";;;" version (but it's very
slight; I'm really OK either way.  In most cases I don't even notice
the difference).

The annoyance you mention doesn't affect me, because I use

    (hide-sublevels (if (eq outline-level 'lisp-outline-level) 1000 1))

to fold most of the actual code when opening the file but none of the
headings.  More specifically, I get something that might look like:

    ;;; foo.el --- Blabla
    ;;; Commentary:
    ;;; Code:
    (require 'cl-lib)
    ;;;; Custom vars:
    (defcustom foo-var nil...
    ;;;; Aux functions
    (defun foo-fun1 (arg)...
    (defun foo-fun2 (arg)...
    ;;; foo.el ends here

[ And I (almost) never toggle the folding or fiddle with it by hand,
  I only use `reveal-mode` to auto-unfold/refold as I move about the buffer.  ]


        Stefan




reply via email to

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