Eli Zaretskii writes: >> From: Robert Cochran >> Cc: Robert Cochran , shanemhansen@gmail.com, 24041@debbugs.gnu.org >> Date: Sun, 21 Aug 2016 19:12:41 -0700 >> >> Anyways, I have a patch, below, that's my first stab at solving the >> problem. All it does is call `check_x_display_info` with the current >> frame and allows any resulting error signals to propagate back up. >> >> Probably not the most elegant solution, but I'm not entirely clear what >> can and can't be done from within the Emacs C core. Suggestions are very >> welcome. > > My only comment is that you could call check_x_display_info with Qnil > as its argument. I did think about that. But then it arguably does the wrong thing: `check_x_display_info` with `Qnil` only signals an error when there have never been X windows, eg, opening and closing an X window satisfies the check from then on. It no longer crashes in that instance, but I personally don't think that's the right behavior; if my starting frame isn't capable of displaying an xwidget, say so! Hence checking with the current frame. That, of course, is just my opinion. > Otherwise, LGTM, thanks. And I see nothing inelegant in this patch. Thanks for your reassurance! My one gripe about this patch is that I didn't figure out how to kill the buffer after xwidget creation failure (leaving it seems rather ugly IMO), but I just now realized what I can do. As long as it's not considered wrong to kill a mode's buffer on error, would you also consider this patch to go along with it? -----