[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#2993: 23.0.92; posn-col-row wrong with line-spacing in terminals
From: |
Eli Zaretskii |
Subject: |
bug#2993: 23.0.92; posn-col-row wrong with line-spacing in terminals |
Date: |
Tue, 14 Apr 2009 16:59:34 +0300 |
> From: Nikolaj Schumacher <me@nschum.de>
> Cc: 2993@emacsbugs.donarmstrong.com
> Date: Tue, 14 Apr 2009 14:12:12 +0200
>
> Eli Zaretskii <eliz@gnu.org> wrote:
>
> >> posn-col-row uses the `line-spacing' value in terminals. According to the
> >> doc `line-spacing' only has an effect in window systems.
> >
> > You mean, on graphic displays.
>
> Yes.
>
> If that wording is inaccurate, it should also be fixed in the doc
> for `line-spacing', which says: "The space is measured in pixels, and
> put below lines on window systems."
Fixed. Thanks for pointing this out.
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -933,8 +933,10 @@ and `event-end' functions."
> (x (/ (car pair) (frame-char-width frame)))
> (y (/ (cdr pair) (+ (frame-char-height frame)
> (or (frame-parameter frame 'line-spacing)
> - ;; FIXME: Why the `default'?
> - (default-value 'line-spacing)
> + (when (display-graphic-p
> + (frame-terminal frame))
> + ;; FIXME: Why the `default'?
> + (default-value 'line-spacing))
> 0)))))
> (cons x y))))))
`display-graphic-p' accepts frames as its argument (see its doc
string ;-), so the extra call to `frame-terminal' is unnecessary.
Thanks.