It seems that there is already a built-in logic in emacs to detect the thing at point and display corresponding information. This is eldoc.
IIUC it could allow the removal of all the code related to the timer.
eldoc-documentation-function needs to be set locally when the mode is enabled.
Two more questions if eldoc is used:
should eldoc mode be turned on automatically when this mode is turned on?
should this library still provide a minor mode? It could only provide a function to configure eldoc and the handling of eldoc-mode would be let to the user. It is even possible to provide both.
It seems that there is already a built-in logic in emacs to detect the thing at point and display corresponding information. This is eldoc.
IIUC it could allow the removal of all the code related to the timer.
eldoc-documentation-function
needs to be set locally when the mode is enabled.Two more questions if eldoc is used: