[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unsolicited patch to image-mode.el -- "fit to window"
From: |
Greg Minshall |
Subject: |
Re: unsolicited patch to image-mode.el -- "fit to window" |
Date: |
Fri, 24 Jul 2015 06:46:28 +0300 |
Martin,
> + (wpixels (window-inside-pixel-edges))
> + (wsize (cons (- (nth 2 wpixels) (nth 0 wpixels))
> + (- (nth 3 wpixels) (nth 1 wpixels)))) ; ditto
>
> Hopefully you should be able to replace this with
>
> + (wsize (cons (window-body-width nil t) (window-body-height nil t))
thanks, that's much clearer.
a "coding philosophy" question, though. there are a dozen or so other
references to (window-size-pixel-edges) (and its associated (nth)'s) in
the code. my tendency would be to change none (in a patch) or all (in a
more substantive re-write). changing all -- while "trivial" -- is, of
course, more likely to introduce bug, and i don't know of any test suite
for image mode?
thoughts?
cheers, Greg Minshall
- unsolicited patch to image-mode.el -- "fit to window", Greg Minshall, 2015/07/12
- Re: unsolicited patch to image-mode.el -- "fit to window", Zack Piper, 2015/07/12
- Re: unsolicited patch to image-mode.el -- "fit to window", Greg Minshall, 2015/07/13
- Re: unsolicited patch to image-mode.el -- "fit to window", Stefan Monnier, 2015/07/15
- Re: unsolicited patch to image-mode.el -- "fit to window", Greg Minshall, 2015/07/23
- Re: unsolicited patch to image-mode.el -- "fit to window", martin rudalics, 2015/07/23
- Re: unsolicited patch to image-mode.el -- "fit to window",
Greg Minshall <=
- Re: unsolicited patch to image-mode.el -- "fit to window", martin rudalics, 2015/07/24
- Re: unsolicited patch to image-mode.el -- "fit to window", Greg Minshall, 2015/07/24
- Re: unsolicited patch to image-mode.el -- "fit to window", martin rudalics, 2015/07/25
- Re: unsolicited patch to image-mode.el -- "fit to window", martin rudalics, 2015/07/25