This function reads the DISPLAY variable, parses it, and then checks to see if it can be opened.
AFAICT this is unnecessarily complicated. Since we always try to open the display corresponding to the value of DISPLAY, we might as well just use XLIB:OPEN-DEFAULT-DISPLAY. Otherwise we are wasting work by duplicating what XLIB:OPEN-DEFAULT-DISPLAY does (better) to parse the value of DISPLAY
If you (Fred) don't object, I'll kill the body of VERIFY-DISPLAY-CAN-BE-OPENED and use XLIB:OPEN-DEFAULT-DISPLAY to do the heavy-lifting instead.
Diff: