bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Nikolaj Schumacher
Subject: bug#2993: 23.0.92; posn-col-row wrong with line-spacing in terminals
Date: Tue, 14 Apr 2009 14:12:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (darwin)

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."

> Please use `display-graphic-p' rather than assuming that if
> `window-system' is non-nil, the display is necessarily a graphic one.
> At least one Emacs configuration violates this assumption.

I see.

--- 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))))))


regards,
Nikolaj Schumacher






reply via email to

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