GNU bug report logs -
#6130
23.1; artist-mode spray-can malfunction
Previous Next
Reported by: busk <busk <at> lysator.liu.se>
Date: Fri, 7 May 2010 13:25:02 UTC
Severity: minor
Found in version 23.1
Done: Johan Busk Eriksson <busk <at> lysator.liu.se>
Bug is archived. No further changes may be made.
Full log
Message #41 received at 6130 <at> debbugs.gnu.org (full text, mbox):
> It's wrong for posn-window to return a frame.
Is it right for it to return nil? There seems to be no particular
restriction on what a "mouse position list" as returned by `event-start'
and `event-end' has to contain. Many callers simply use the selected
window or the window buffer of the selected window when the return value
of `posn-window' is nil.
> So are there callers that
> actually rely on this wrong behavior? Are there callers where returning
> nil instead of a frame would be a problem? Are there callers where
> signaling an error instead of returning a frame would be a problem?
`handle-delete-frame' seems to be the only function that expects
`posn-window' to return a frame (unconditionally, BTW). I don't
understand `handle-delete-frame' but it hardly will cause problems when
it gets nil or an error.
I didn't check for occurrences of things like "(nth 0 position".
>> This would backfire for people who would like `posn-window' to always
>> return the first element of a position.
>
> That's OK, in the sense that we don't care if people's feelings
> are hurt. But if it breaks existing packages it's more problematic.
If we really cared, we'd probably have to write something like
(defsubst posn-window (position)
"Return the window in POSITION.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
(if (window-live-p (nth 0 position))
(nth 0 position)
'none))
martin
This bug report was last modified 9 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.