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
View this message in rfc822 format
Thank you very much, especially for the detailed explanation.
> Here's a patch that handles 1 through 3.
I think your patch should go into Emacs 24.5. Have you signed a FSF
copyright form? If not, please do that as soon as possible.
> The extra explanatory material
> in the docs might be an inelegant half measure, though, considering the
> function and variable names still refer to the object as a window
> regardless of its actual type.
We could rename it to `posn-window-or-frame' and provide an alias.
> I also went ahead and searched the lisp/ tree for other places that
> looked risky -- that is, where a position object was assumed to hold a
> window in a context where there was no such guarantee. Nothing jumped
> out at me, but there could be any number of issues with third-party
> code.
`posnp' also looks strange in this regard.
> +the second element of any mouse event in the same way. However, the
^
Please always use two spaces after the end of a sentence.
> +drag event may end outside the boundaries of the selected frame. In
> +that case, the third element's position list contains the selected
> +frame in place of a window.
I'd expect it to be the selected frame but are we 100% sure? Could this
frame not still be the frame selected at the time mouse dragging started
while the selected frame has changed under our feet? Think of weird
things like `focus-follows-mouse' and `mouse-autoselect-window'. (This
remark might be silly but I was too lazy to test its validity right now.)
> +location outside the boundaries of the selected frame, in which case
> +the list contains the selected frame in place of a window.
Same as before.
> +Return the window that @var{position} is in. If the frame with input
> +focus does not have any window at @var{position}, return the frame
> +instead.
Hmmm... here you use "frame with input focus". This looks better but
I'm still not entirely convinced.
> + (window (if (windowp frame-or-window)
> + frame-or-window
> + nil))
Please use either
(and (windowp frame-or-window) frame-or-window)
or
(when (windowp frame-or-window) frame-or-window)
here.
> + (let* ((spacing (when (display-graphic-p frame)
> + (or (with-current-buffer (window-buffer window)
Here `window' is the selected window. IMHO
(frame-selected-window frame)
sounds more accurate, given what I said about the selected frame above.
> diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
I didn't look into these but just trust your experience here.
Thanks again, 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.