* John Paul Wallington:
> Sorry I'm so late again.
No worries. Thanks for testing !
> It doesn't crash, but it does cause an error:
>
> xemacs-21.4 src/xemacs -vanilla -batch -eval
> '(mswindows-send-sys-command #xf030)' Wrong type argument:
> console-mswindows-p, #<stream-frame "stream" 0x12c> xemacs exiting
>
> Same when used in tty. This can be avoided using a frame_type_p test:
>
> if (NILP (frame))
> frame = Fselected_frame (Qnil);
> if (FRAME_TYPE_P (XFRAME (frame), mswindows))
[...]
> Seems to work fine for native windows frames, X11 frames, tty and
> batch.
Cool !
The Emacs equivalent, `w32-send-sys-command', also errors when the
frame is a Non-Win32 GUI frame (albeit with the message "Non-W32
frame used").
Perhaps this XEmacs `mswindows-send-sys-command' should do likewise
when the FRAME_TYPE_P test is false ? I'm not sure whether it is
preferable to error or not. Unless anyone else has an opinion it's
your call.
My 2 cents: I'd prefer to not flag an error: this is low level enough that
I don't expect anyone using it to be surprised when it doesn't work on X11
frames, and I don't see any benefit in forcing people to conditionalize
calls to it to avoid the error message. That it only works on native
windows frames could be mentioned in the docstring.
-- René