I'm hacking together an extension which will display a sidebar with an outline of whatever document you're working on. It was initially written to support writing in markdown-mode, but the technique I'm using (which might be bone-headed) relies on using outline-mode commands like
outline-hide-body. As such, the extension should, I think, work for any mode for which these commands have an effect.
So my question is: is there a way to determine if outline-mode commands - and specifically
outline-hide-body - are properly defined for a given buffer?
Right now I just rely on a list of major-modes (e.g. org-mode, markdown-mode) for which I know these commands work. But this seems like a relatively weak approach since it ignores e.g. outline-minor-mode which I should probably check for as well. So before I go down the path of trying to enumerate the the major and minor modes I can work with, I thought I should see if there's a better way.