Subject: Re: bug#6130: 23.1; artist-mode spray-can malfunction

From: Eli Zaretskii <[email-masked]>
Date: Fri, 23 Jan 2015 23:26:11 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked],  [email-masked],  [email-masked]
> Date: Fri, 23 Jan 2015 16:05:33 -0500
> 
> >>> > It's wrong for posn-window to return a frame.
> >> Can you explain why it's wrong?
> 
> If you take a step back and read my sentence you'll see it's pretty
> obvious: since it says "window" it shouldn't return a "frame".

We do that all the time.  For example:

  (display-graphic-p &optional DISPLAY)

  Return non-nil if DISPLAY is a graphic display.
  [...]
  DISPLAY can be a display name, a frame, or nil (meaning the selected
  frame's display).

In polymorphic interfaces, the alternative is to say
DISPLAY-OR-FRAME-OR-... which is too tedious.