[Top][All Lists]

[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


> +           (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?


cheers, Greg Minshall

reply via email to

[Prev in Thread] Current Thread [Next in Thread]