1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00

Fix rare failures in 'window-default-font-height'

* lisp/window.el (window-default-font-height): Avoid signaling an
error when a client TTY frame happens to have an X-style 'display'
parameter.  (Bug#48408)
This commit is contained in:
Eli Zaretskii 2021-05-19 19:01:07 +03:00
parent eb9f48bfad
commit 171dbe7048

View File

@ -8788,7 +8788,11 @@ font on WINDOW's frame."
(let* ((window (window-normalize-window window t))
(frame (window-frame window))
(default-font (face-font 'default frame)))
(if (and (display-multi-font-p (frame-parameter frame 'display))
;; Client frames can have the 'display' parameter set like for X
;; frames, even though they are TTY frames, so make sure we won't
;; be duped by that up front with 'framep'.
(if (and (not (eq (framep frame) t))
(display-multi-font-p (frame-parameter frame 'display))
(not (string-equal (frame-parameter frame 'font) default-font)))
(aref (font-info default-font frame) 3)
(frame-char-height frame))))