On 2016-07-15 16:25, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org >> From: Clément Pit--Claudel >> Date: Fri, 15 Jul 2016 16:21:12 +0200 >> >>> Frame-creation code is mostly in C. >> >> Sure, but that code (the one that ‘make-frame’ calls) already exists independently of the code for popups, right? If that's correct, couldn't one imagine the non-toolkit pop-up code being entirely moved to lisp, with the exception of the part that makes a frame frame chromeless? > > Maybe I misunderstand what you have in mind, but there's almost > nothing to move to Lisp after that exception. Take a look at > tooltip.el -- that's all that's left for Lisp to do about tooltips. I think it's more likely that I'm misunderstanding the C code :) Looking in xfns.c, there seems to be about 1000 lines of code for tooltips, and significant overlap between x_create_frame and x_create_tip_frame. Most of the rest (about 700 lines) seems to be code that deals with creating timers, and showing and hiding tooltip frames. Isn't that right? Clément.