martin rudalics writes: > I tried to do that but wasn't able to get some useful behavior out of > it. All Emacs tells me is that it was entering the debugger. Since you > have both, the 'martin' function and the eldoc-tooltip-joao.el file, > could you please just put the former into the latter and send it to me > so I'm not doing anything wrong. OK. I've done a bit more work on that file, which I attach. See the Commentary: section. You'll notice I removed a eldoc-tooltip--make-2 function and removed the global mode (I don't think it's strictly needed and sort of stands in the way of this useful functionality, but you can add it back, if you wish.) > Maybe it's also the 'martin' function itself but I also (1) get an > empty tooltip using that function in my normal eldoc-tooltip.el - so > 'martin' apparently does not always "return nil when there’s no doc > appropriate for the context" and (2) window scrolling sometimes stops > here without apparent reason - something which may be completely > unrelated to the eldoc problem, given that I have not pulled master > for months. Right, I fixed these bugs in the eldoc-tooltip-joao.el. Sorry, but last time I tested only very briefly, now I spent some more minutes on it. >> Makes perfect sense I guess. You should be able to >> >> (remove-hook 'eldoc-display-functions 'eldoc-display-in-echo-area) > > This works indeed. It's good to have some third party testing being done on this. >> instead of a global minor mode. Then you would let ElDoc mode _drive_ >> your extension. > > I'm not yet sure of the consequences of doing that. Hopefully, a very useful new feature that works cooperates fully with the ElDoc framework. We'll see later how to add backward compatibility to Emacs 27 and earlier. Instead of reimplementing ElDoc's idle timers, I think the best bet is to leverage `eldoc-message` either via `eldoc-message-function' or with some advice for older version, like Yuan Fu does. It won't be as clean as the Emacs 28 implementation, but should work. João