I am looking for an example, please, to programmatically control the order of functions within a particular hook:
First in time, which is easy -- i.e., don't append using
Last in time, which is easy -- i.e., append using
Second to last -- not so easy?
In the context of this particular question, there are three (3) functions assigned to the
An overlay removal function, which must always be first in time.
flyspell-post-command-hookfunction that must always be last in time -- if
A overlay placement function that must be last in time when
flyspell-modeis not active, or second to last when
Essentially, I would like to control the overlay placement function to programmatically check to see whether
flyspell-mode is active, and if so, then place it second to last. If
flyspell-mode is not active, then just append so that the overlay placement function becomes the last in the hook.