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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48408: BUGFIX: window-default-font-height: check for nil string


From: Boruch Baum
Subject: bug#48408: BUGFIX: window-default-font-height: check for nil string
Date: Thu, 13 May 2021 21:15:19 -0400
User-agent: NeoMutt/20180716

In package windows.el, function `window-default-font-height' calls
function `face-font', which can return a nil value, but performs a
`string-equal' operation on the output without checking for that
possibiliy.

I came across this in an unusual case, of having an 'emacs -nw' server
an 'emacsclient -nw', and opening a GUI emacsclient to connect to it.
From that point forward until the fix, every *second* attempt to use the
minibuffer on the 'emacsclient -nw' would fail.

The fix I'm using is:

    (if (and (display-multi-font-p (frame-parameter frame 'display))
             (stringp default-font)  ; <<<---!!!
             (not (string-equal (frame-parameter frame 'font) default-font)))

But there could be other considerations to performing things in another way.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





reply via email to

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