Third attempt of solving the problem of what to do whenever the user
tries to activate Outshine when Outline isn't activated. Just
calling (outline-minor-mode 1) enters an endless hook
loop (outline-minor-mode-hook calls outshine which calls
outline-minor-mode which runs its hook etc). (error)ing raises error
in strange circumstances, like changing the major mode. This seems to work.
This looks like a good idea (to me at least), but it makes it very
easy to introduce confusing bugs. Consider the obvious configuration
line:
(add-hook 'outline-minor-mode-hook 'outshine-minor-mode)
this actually triggers a Lisp stack overflow, since
outshine-minor-mode will call outline-minor-mode, which will run its
hooks, calling back `outshine-minor-mode`, and so on. Since hooks are
run when the mode is activated *or* deactivated, there's no simple way
to make this predictible and safe.
- The file was marked globally obsolete in a comment.
- All it does is define/override functions and variables in the
`outline-` pseudo-namespace.
- These functions were merged in outshine.el and were renamed or
removed by a previous commit.
The following functions were renamed by adding outshine- before their
name (ie, they all match "^outshine-outline-")
- `outline-cycle-emulate-tab`
- `outline-change-level`
- `outline-headings-list`
- `outline-change-heading`
- `outline-headings-atom`
- `outline-cleanup-match`
- `outline-static-level-p`
- `outline-next-line`
- `outline-cycle`
- `outline-body-p`
- `outline-body-visible-p`
- `outline-subheadings-p`
- `outline-subheadings-visible-p`
- `outline-hide-more`
- `outline-show-more`
This deletes:
- `outline-hide-other`
- `outline-hide-sublevels`
- `outline-move-subtree-up`
- `outline-move-subtree-down`
- `outline-promote`
- `outline-demote`
These functions are already defined in outline.el, and Outshine should
not override them.
This allows outshine package to be autoloaded so that the user need not
manually add (require 'outshine). Using autoload is a generally good
idea. Also this change makes it easier to create a spacemacs layer for
outshine, outorg, and navi packages.