notmuch/emacs
Jonas Bernoulli 2ca941163d emacs: make headings outline-minor-mode compatible
`outline-minor-mode' treats comments that begin with three or more
semicolons as headings.  That makes it very convenient to navigate
code and to show/hide parts of a file.

Elips libraries typically have four top-level sections, e.g.:

;;; notmuch.el --- run notmuch within emacs...
;;; Commentary:...
;;; Code:...
;;; notmuch.el ends here

In this package many libraries lack a "Commentary:" section, which is
not optimal but okay for most libraries, except major entry points.

Depending on how one chooses to look at it, the "... ends here" line
is not really a heading that begins a section, because it should never
have a "section" body (after all it marks eof).

If the file is rather short, then I left "Code:" as the only section
that contains code.  Otherwise I split the file into multiple sibling
sections.  The "Code:" section continues to contain `require' and
`declare-function' forms and other such "front matter".

If and only if I have split the code into multiple sections anyway,
then I also added an additional section named just "_" before the
`provide' form and shortly before the "...end here" line.  This
section could also be called "Back matter", but I feel it would be
distracting to be that explicit about it.  (The IMO unnecessary but
unfortunately still obligatory "... ends here" line is already
distracting enough as far as I am concerned.)

Before this commit some libraries already uses section headings, some
of them consistently.  When a library already had some headings, then
this commit often sticks to that style, even at the cost inconsistent
styling across all libraries.

A very limited number of variable and function definitions have to be
moved around because they would otherwise end up in sections they do
not belong into.

Sections, including but not limited to their heading, can and should
be further improved in the future.
2021-01-13 07:10:27 -04:00
..
.gitignore emacs: build docstring (rsti) files 2018-12-08 08:49:31 -04:00
coolj.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
make-deps.el emacs: Increase consistency of library headers 2020-08-09 21:14:36 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local emacs: Use makefile-gmake-mode in Makefile*s 2020-08-09 21:14:36 -03:00
notmuch-address.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-company.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-compat.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-crypto.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-draft.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-emacs-mua notmuch-emacs-mua: add --hello parameter 2016-11-26 08:15:11 -04:00
notmuch-emacs-mua.desktop emacs: add keywords to notmuch-emacs-mua.desktop 2019-06-29 21:06:18 +02:00
notmuch-hello.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-jump.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-lib.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-logo.png emacs: Add notmuch-hello.el, a friendly frontend to notmuch 2010-04-23 12:50:18 -07:00
notmuch-maildir-fcc.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-message.el emacs: Shorten long lines 2020-08-09 19:48:36 -03:00
notmuch-mua.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-parser.el emacs: use setq-local 2020-12-06 16:22:33 -04:00
notmuch-pkg.el.tmpl NEWS: At least Emacs 25.1 is required now 2020-08-09 21:14:36 -03:00
notmuch-print.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-query.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-show.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-tag.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-tree.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch-version.el.tmpl emacs: Increase consistency of library headers 2020-08-09 21:14:36 -03:00
notmuch-wash.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
notmuch.el emacs: make headings outline-minor-mode compatible 2021-01-13 07:10:27 -04:00
rstdoc.el emacs docs: rstdoc.el: consistent single quote conversions 2020-10-21 06:55:39 -03:00
rstdoc.rsti emacs: initial version of rstdoc.el 2018-12-08 08:45:48 -04:00