hayamiz/twittering-mode — Issue #57: help-overlay should use after-string rather than before-string
Author: iRi-E
Created: 2012-02-09 06:37:27+00:00
State: open

I use a minor mode which puts an overlay as after-string at the end of buffer.
However, twittering-edit-mode uses before-string to show the help at the beginning of the buffer, so the minor mode's overlay incorrectly will displayed above the help ovelay.

If overlay's start and end point the same position, before-string will displayed \*after\* after-string!

For example,

(setq help-ol (make-overlay 1 1))
(setq my-ol (make-overlay 1 1))
(overlay-put help-ol 'before-string "Help\n")
(overlay-put my-ol 'after-string "END-OF-BUFFER")

This code will produce the following result:

END-OF-BUFFERHelp

It's obviously not intended result.

I think the help-overlay should use after-string rather than before-string and set appropriate non-zero priority like below:

(overlay-put help-overlay 'after-string help-str)
(overlay-put help-overlay 'priority 1000)